From: Kurt Zeilenga Date: Wed, 4 Nov 1998 01:44:41 +0000 (+0000) Subject: Replaced #ifdef'ed ldap_lderrno() call with ldap_get_option() call. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~1226 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=500351993c12708ffc805fd86f78772f1af3f12b;p=openldap Replaced #ifdef'ed ldap_lderrno() call with ldap_get_option() call. --- diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index a73f0c6bf1..cc9d7f1567 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -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;