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

Re: ldap_result takes time to indicate that there are no more result.



Pierangelo Masarati wrote:
Dmitri Priimak wrote:
Hi All.

I have a question about ldap_result. I use openldap-2.3.32. It is my
understanding that this function (ldap_result) is
used in a loop until no more results are coming from the servers. Am I
right about it? The problem I have is that the
last time it is calle it hangs there for a while and finally returns
null LDAPMessage and -1 return value. I am talking
here about 10-15 seconds. Is it normal that it takes that long? I would
expect it to be pretty much instantaneous.

It waits for the server to send a response message that concludes the operation. If it does not return immediately, it is likely because the server is not sending any, so it is unlikely the client library is to be blamed. Feel free to abandon the operation as soon as you know that no more results are coming, or make sure the server gently ends the operation by sending the response message

How would I know that there are no more results coming? I was thinking that you call ldap_result until it returns NULL LDAPMessage. Is there some other way? May be the last non-null LDAPMessage includes something to tell that it is the last one?

--
Dmitri Priimak