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

(ITS#8545) Undesired timeout when polling for results

Full_Name: Shahar Lupu
Version: 2.4.44
OS: Ubuntu
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

When calling ldap_result with a timeout={0,0} (polling), it returns LDAP_TIMEOUT
even though there are available messages in the socket.
This occurs when calling ldap_results with all=true and a multi-message response
has arrived. In this case, if the client has already received on the socket
every message for the response, it is desirable that all the messages are
collected within this ldap_result call. Instead of only polling for the
specified timeout, ldap_result applies the timeout (zero when polling) on the
wait4msg loop. Consequently, ldap_result returns LDAP_TIMEOUT after the first
message if the response is composed of more than one message.
While it may be a good idea to apply a timeout for the wai4msg loop (rather than
only the polling on the socket), it is undesirable in some cases and should at
least be configurable. Or perhaps timeout=polling should never be applied on the
wait4msg loop.