From 781a8e2afc0b3c89fdfc1db0da6ff91740377000 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 3 Jun 2000 16:28:47 +0000 Subject: [PATCH] Use ldap_parse_result instead of deprecated ldap_result2error --- clients/tools/ldapsearch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 319b31b886..460b199f1f 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -671,7 +671,7 @@ static int dosearch( char *value) { char filter[ BUFSIZ ]; - int rc, first, matches; + int rc, first, matches, err; LDAPMessage *res, *e; if( filtpatt != NULL ) { @@ -721,7 +721,8 @@ static int dosearch( ldap_perror( ld, "ldap_result" ); return( rc ); } - if (( rc = ldap_result2error( ld, res, 0 )) != LDAP_SUCCESS ) { + rc = ldap_parse_result( ld, res, &err, NULL, NULL, NULL, NULL, 0 ); + if ( rc != LDAP_SUCCESS || rc != LDAP_SUCCESS ) { ldap_perror( ld, "ldap_search" ); } if ( sortattr != NULL ) { -- 2.39.5