Use ldap_parse_result instead of deprecated ldap_result2error

This commit is contained in:
Kurt Zeilenga 2000-06-03 16:28:47 +00:00
parent 4b352c57ed
commit 781a8e2afc

View 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 ) {