]> git.sur5r.net Git - openldap/commitdiff
Replaced #ifdef'ed ldap_lderrno() call with ldap_get_option() call.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 4 Nov 1998 01:44:41 +0000 (01:44 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 4 Nov 1998 01:44:41 +0000 (01:44 +0000)
clients/tools/ldapsearch.c

index a73f0c6bf19983d588572739135f6f8254fc2466..cc9d7f156724a9311db25a845d249d149eda5157 100644 (file)
@@ -342,12 +342,11 @@ static int dosearch(
     }
 
     if ( ldap_search( ld, base, scope, filter, attrs, attrsonly ) == -1 ) {
-       ldap_perror( ld, "ldap_search" );
-#ifdef HAVE_LDERRNO
-       return( ldap_lderrno(ld) );
-#else
-       return( -1 );
-#endif
+               int ld_errno;
+               ldap_perror( ld, "ldap_search" );
+
+               ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
+               return( ld_errno );
     }
 
     matches = 0;