diff options
author | Bradley Nicholes <bnicholes@apache.org> | 2005-02-01 18:09:56 +0100 |
---|---|---|
committer | Bradley Nicholes <bnicholes@apache.org> | 2005-02-01 18:09:56 +0100 |
commit | cebf3cf9e9eb3d3485bee15c3d5f0d90732fcf9e (patch) | |
tree | 844ec63da309d28a8383089ac9ac401a6fd44579 /modules | |
parent | update transformation (diff) | |
download | apache2-cebf3cf9e9eb3d3485bee15c3d5f0d90732fcf9e.tar.xz apache2-cebf3cf9e9eb3d3485bee15c3d5f0d90732fcf9e.zip |
Set the connection timeout for LDAP SDK's that support the option. For SDK's that don't, log a warning message.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@149419 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ldap/util_ldap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index 1148317908..bfce1ad5dd 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -1605,11 +1605,16 @@ static const char *util_ldap_set_connection_timeout(cmd_parms *cmd, void *dummy, return err; } +#ifdef LDAP_OPT_NETWORK_TIMEOUT st->connectionTimeout = atol(ttl); ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, cmd->server, "[%d] ldap connection: Setting connection timeout to %ld seconds.", getpid(), st->connectionTimeout); +#else + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, + "LDAP: Connection timout option not supported by the LDAP SDK in use." ); +#endif return NULL; } @@ -1811,6 +1816,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, "LDAP: SSL support unavailable" ); } +#ifdef LDAP_OPT_NETWORK_TIMEOUT if (st->connectionTimeout > 0) { timeOut.tv_sec = st->connectionTimeout; } @@ -1823,6 +1829,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, "LDAP: Could not set the connection timeout" ); } } +#endif return(OK); |