Skip to content
Snippets Groups Projects
Commit 78bd3bf6 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

handle LDAPv2 when returning timelimit; silence warning

parent e56ab6a7
No related branches found
No related tags found
No related merge requests found
......@@ -316,7 +316,12 @@ retry:;
rc = ldap_parse_extended_result( ld, res,
NULL, &data, 0 );
if ( rc == LDAP_SUCCESS ) {
rc = ldap_result2error( ld, res, 1 );
int err;
rc = ldap_parse_result( ld, res, &err,
NULL, NULL, NULL, NULL, 1 );
if ( rc == LDAP_SUCCESS ) {
rc = err;
}
res = NULL;
/* FIXME: in case a referral
......@@ -834,7 +839,8 @@ retry:;
case 0:
if ( timeout ) {
(void)ldap_abandon_ext( lc->lc_ld, msgid, NULL, NULL );
rs->sr_err = LDAP_ADMINLIMIT_EXCEEDED;
rs->sr_err = op->o_protocol >= LDAP_VERSION3 ?
LDAP_ADMINLIMIT_EXCEEDED : LDAP_OPERATIONS_ERROR;
rs->sr_text = "Operation timed out";
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment