[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#7009) TIMEOUT with unexpected results

> Full_Name: Bjoern Jacke
> Version: 2.4.23
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (
> When TIMEOUT is set and happend to occur there is nothing that shows that
> we
> timed out. For example if you do a large/slow LDAP search using ldapsearch
> and
> then stop the conversation between slapd and ldapsearch by "killall -STOP
> slapd"
> then ldapsearch will terminate after TIMEOUT seconds and it will return
> the
> number of records that it got so far and exit with return code 0 and not
> error
> message. I'd expect that after TIMEOUT occuring that we get a warning and
> a
> return code != 0

libldap's ldap_result() sets ld_errno to LDAP_TIMEOUT but returns 0, so
ldapsearch (and all tools) are fooled by not actually checking ld_errno
(actually, ldap_get_option(LDAP_OPT_RESULT_CODE)).