Re: LDAP_SUCCES on ldap_search_ext when host is unreachable
[email protected] Wed, 16 Oct 2013 07:38:32 -0700 (PDT)
| Newsgroups | gmane.comp.mozilla.devel.directory |
|---|---|
| Message-ID | <[email protected]> |
Thanks for information. Effectivily, i see that is the tcp stack who accept or not packet. If host is unreachable, my program wait a response, but, if the server ldap isn't start, tcp receive a TCP_RST and the ldap_search_ext is LDAP_DOWN. However, i don't know if is a problem or not, but i have make a simple test. If i initialize and i make a search directly, my program wait some minutes befor ldap return a LDAP_DOWN. On the other side, if i initialize, make a bind on host UP and apply an iptables to make host down. When i make a ldap_search_ext(), i have a LDAP_SUCCESS. the SDK ldap consider that the host is connected and don't make a bind request. With your information, i have call ldap_result() and with good timeout, i can see if host answer and can make a request on my second ldap server. But, an another problem become. I make a ldap_search_ext() for asynchronous mode because i have a thread who send request and a thread who receive result, so on one situation (when the search as not result), the result is delete by ldap_result() and my receiuve thread don't have the result. Thanks Clement