mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
ITS#4933 use ldap_set_option for search timelimit
This commit is contained in:
parent
8eb0741a1c
commit
299d19506a
1 changed files with 3 additions and 6 deletions
|
|
@ -320,7 +320,6 @@ ldap_sync_search(
|
|||
BerElementBuffer berbuf;
|
||||
BerElement *ber = (BerElement *)&berbuf;
|
||||
LDAPControl c[2], *ctrls[3];
|
||||
struct timeval timeout;
|
||||
ber_int_t msgid;
|
||||
int rc;
|
||||
int rhint;
|
||||
|
|
@ -405,12 +404,8 @@ ldap_sync_search(
|
|||
ctrls[1] = NULL;
|
||||
}
|
||||
|
||||
timeout.tv_sec = si->si_tlimit;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
rc = ldap_search_ext( si->si_ld, base, scope, filter, attrs, attrsonly,
|
||||
ctrls, NULL, si->si_tlimit > 0 ? &timeout : NULL,
|
||||
si->si_slimit, &msgid );
|
||||
ctrls, NULL, NULL, si->si_slimit, &msgid );
|
||||
ber_free_buf( ber );
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -449,6 +444,8 @@ do_syncrep1(
|
|||
op->o_ssf = ( op->o_sasl_ssf > op->o_tls_ssf )
|
||||
? op->o_sasl_ssf : op->o_tls_ssf;
|
||||
|
||||
ldap_set_option( si->si_ld, LDAP_OPT_TIMELIMIT, &si->si_tlimit );
|
||||
|
||||
/* We've just started up, or the remote server hasn't sent us
|
||||
* any meaningful state.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue