]> git.sur5r.net Git - openldap/commitdiff
Use ldap_parse_result instead of deprecated ldap_result2error
authorKurt Zeilenga <kurt@openldap.org>
Sat, 3 Jun 2000 16:28:47 +0000 (16:28 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 3 Jun 2000 16:28:47 +0000 (16:28 +0000)
clients/tools/ldapsearch.c

index 319b31b8860fef9c2025a93950a4d293179492ff..460b199f1f17acbfe75bbb796c893edf9970942d 100644 (file)
@@ -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 ) {