Re: LDAP_SUCCES on ldap_search_ext when host is unreachable
Mark Smith <[email protected]> Mon, 14 Oct 2013 08:48:29 -0400
| Newsgroups | gmane.comp.mozilla.devel.directory |
|---|---|
| Message-ID | <[email protected]> |
On 10/14/13 4:02 AM, [email protected] wrote: > I have a question about ldap_search_ext result. What LDAP_SUCCESS means ? > the function return LDAP_SUCCESS when the request was send and a answer was receive or just when the request was send. It means the request was sent. See: http://www-archive.mozilla.org/directory/csdk-docs/using.htm#check_ldap_request_sent However, "sent" may not mean what you think it should. What it really means is that the data has been accepted by the networking stack on the sending computer. To reliably detect failures of the TCP connection (I assume from your previous post that this is one of your requirements), you may need to call ldap_result(). Note that depending on the failure mode and various configuration options, it can take a fairly long time for the TCP stack to detect a loss of connectivity. -- Mark Smith Pearl Crescent, LLC http://pearlcrescent.com/