mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
Use ldap_parse_result instead of deprecated ldap_result2error
This commit is contained in:
parent
4b352c57ed
commit
781a8e2afc
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user