[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldap_simple_bind_s ok ,but ldap_simple_bind no



owen nirvana writes:
> ldap_simple_bind could not work , but ldap_simple_bind_s is ok.
> the former return "Operations Error",

You neglected to show any code, but here is my guess:  You are treating
the return value from ldap_simple_bind() is an LDAP result code instead
of as a message ID.  The first LDAP operation on a connection likely
gets message ID #1, and LDAPResult.resultCode.operationsError == 1.

Read the manual: ldap_simple_bind_s() is a synchronous routine and thus
returns an LDAP result code.  ldap_simple_bind() is asynchronous and
thus returns a message ID you are supposed to pass to ldap_result().

-- 
Hallvard