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

Re: Deprecated ldap_result2error()



	Hi
	Many thanks for helping. I thought so, but it does not give the
expected result.

	When I bind with a duff password synchronously,  I get the
following:
	ldap_simple_bind_s rc=49 (LDAP_INVALID_CREDENTIALS)
	ldap_err2string(rc) = Invalid credentials
	ldap_unbind_s() returned 0 (LDAP_SUCCESS)

	When I bind asynchronously, I get the following result:
	ldap_simple_bind msgid=1
	ldap_result rc=97 (LDAP_RES_BIND)
	ldap_parse_result rc=0 (LDAP_SUCCESS)
	error_msg=R000104 The password is not correct.
	controls=(nil)
	ldap_result2error rc=49 (LDAP_INVALID_CREDENTIALS) -> but this is
deprecated!
	ldap_err2string(rc) = Invalid credentials
	ldap_unbind_s() returned 0 (LDAP_SUCCESS)

	In my case it seems that ldap_parse_result() returns whether parsing
was successful, not if the original bind
	succeeded?

	Many thanks once again,
	regards,
	Albert Pretorius







	From:	"Kurt D. Zeilenga" <Kurt@OpenLDAP.org> on 08/08/2002 17:01
	Office Phone No:  
	To:	Albert Pretorius/GS/NORWICHUNION@NORWICHUNION
	cc:	openldap-software@OpenLDAP.org@SMTP@NUExchange 
	Subject:	Re: Deprecated ldap_result2error()

	At 08:10 AM 2002-08-08, PRETORIUS, Albert wrote:
	>I am having difficulty to find the replacement routine for
	>ldap_result2error() which is marked as deprecated in ldap.h.
	>After doing an async ldap_simple_bind() followed by ldap_result()
and
	>ldap_parse_result(), I need a way of getting ld_errno from the
opaque LDAP
	>ld structure.

	You already have it... returned by ldap_parse_result(3).

	>The ldap_result2error() does nicely.
	>I am using openldap-2.0.23.
	>Any pointers are greatly appreciated!
	>
	>many thanks
	>Albert Pretorius
	>
	>
	>
	>
	
>**********************************************************************
	>This email and any files sent with it are intended only for the
named 
	>recipient. If you are not the named recipient please
telephone/email  
	>the sender immediately. You should not disclose the content or

	>take/retain/distribute any copies.

	
>**********************************************************************




**********************************************************************
This email and any files sent with it are intended only for the named 
recipient. If you are not the named recipient please telephone/email  
the sender immediately. You should not disclose the content or        
take/retain/distribute any copies.                                    
**********************************************************************