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

Fw:ld_errno field & ldap_perror



Hi

I MUST develop an LDAP client
i MAY get no answer, but OpenLDAP developpers
SHOULD be able to answer these
3 questions :

---1---
why is ldap_perror() deprecated ?
I noticed that it takes an LDAP structure 
parameter, while
ldap_err2string() only takes an error code param...

---2---
What is the difference between the result of a 
function (eg ldap_search_ext_s())
and the ld_errno field of the LDAP structure ?

Example :
it seems that when a function (eg ldap_bind_s()) 
doesn't end normally,
the error code is returned
BUT the ld_errno field is filled with the error 
code too !!??
-->extracts from clients/tools/ldapsearh.c :
	rc = ldap_initialize( &ld, ldapuri );
	if( rc != LDAP_SUCCESS ) {
		fprintf( stderr, "Could not create 
LDAP session handle (%d): %s\n",
		rc, ldap_err2string(rc) );

if ( ldap_bind_s( ld, binddn, passwd.bv_val, 
                   authmethod )	!= LDAP_SUCCESS ) 
{ ldap_perror( ld, "ldap_bind" );


---3---
(Related to first one)
Why does ldapsearch.c use BOTH ldap_err2string & 
ldap_perror,
while C API's draft claim ldap_perror() is 
deprecated and recommend to use ONLY 
ldap_err2string ??
this seems a bit "hybrid"...



Thanks in advance for help

Sam




Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,13 ?/mn) ; tél : 08 92 68 13 50 (0,34?/mn)"