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

How to setl the timeout for ldap_simple_bind_s()

Hi, there
   I meet a problem while using a ldap client based on openldap-2.0.27.
   In common cases provided an wrong server name and port  the
ldap_simple_bind_s() will return with
errors, however, sometimes if there are just some service programs
running on that server:port, eg. http
service, it seems that ldap_simple_bind_s will not return anymore ...
   I wonder if there are approaches to set timeout for the
ldap_simple_bind_s() calling. I have tried with
ldap_set_option() to set LDAP_OPT_TIMEOUT and LDAP_OPT_NETWORK_TIMEOUT,
but it
seems not taking effect.
   Thanks for your idea.