Loading STATUS +0 −7 Original line number Diff line number Diff line Loading @@ -257,13 +257,6 @@ PATCHES TO BACKPORT FROM TRUNK: +1: jorton, trawick (isn't it worth a CHANGES entry for a storage corruption fix?) *) mod_ldap: Change the LDAP connection timeout to per-connection rather than global. Fixes PR: 34618 http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/ldap/util_ldap.c?rev=164919&r1=164918&r2=164919&view=diff or 2.0 view patch http://issues.apache.org/bugzilla/attachment.cgi?id=14873 +1: bnicholes, minfrin, pquerna *) Have configure refuse to build with doomed combinations of internal/external APR/APR-util. http://svn.apache.org/viewcvs?rev=170029&view=rev Loading modules/experimental/util_ldap.c +15 −15 Original line number Diff line number Diff line Loading @@ -241,6 +241,8 @@ LDAP_DECLARE(int) util_ldap_connection_open(request_rec *r, int result = 0; int failures = 0; int version = LDAP_VERSION3; int rc = LDAP_SUCCESS; struct timeval timeOut = {10,0}; /* 10 second connection timeout */ util_ldap_state_t *st = (util_ldap_state_t *)ap_get_module_config( r->server->module_config, &ldap_module); Loading Loading @@ -317,6 +319,19 @@ LDAP_DECLARE(int) util_ldap_connection_open(request_rec *r, /* always default to LDAP V3 */ ldap_set_option(ldc->ldap, LDAP_OPT_PROTOCOL_VERSION, &version); #ifdef LDAP_OPT_NETWORK_TIMEOUT if (st->connectionTimeout > 0) { timeOut.tv_sec = st->connectionTimeout; } if (st->connectionTimeout >= 0) { rc = ldap_set_option(NULL, LDAP_OPT_NETWORK_TIMEOUT, (void *)&timeOut); if (APR_SUCCESS != rc) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, "LDAP: Could not set the connection timeout" ); } } #endif } Loading Loading @@ -1405,7 +1420,6 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, void *data; const char *userdata_key = "util_ldap_init"; struct timeval timeOut = {10,0}; /* 10 second connection timeout */ /* util_ldap_post_config() will be called twice. Don't bother * going through all of the initialization on the first call Loading Loading @@ -1630,20 +1644,6 @@ 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; } if (st->connectionTimeout >= 0) { rc = ldap_set_option(NULL, LDAP_OPT_NETWORK_TIMEOUT, (void *)&timeOut); if (APR_SUCCESS != rc) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "LDAP: Could not set the connection timeout" ); } } #endif return(OK); } Loading Loading
STATUS +0 −7 Original line number Diff line number Diff line Loading @@ -257,13 +257,6 @@ PATCHES TO BACKPORT FROM TRUNK: +1: jorton, trawick (isn't it worth a CHANGES entry for a storage corruption fix?) *) mod_ldap: Change the LDAP connection timeout to per-connection rather than global. Fixes PR: 34618 http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/ldap/util_ldap.c?rev=164919&r1=164918&r2=164919&view=diff or 2.0 view patch http://issues.apache.org/bugzilla/attachment.cgi?id=14873 +1: bnicholes, minfrin, pquerna *) Have configure refuse to build with doomed combinations of internal/external APR/APR-util. http://svn.apache.org/viewcvs?rev=170029&view=rev Loading
modules/experimental/util_ldap.c +15 −15 Original line number Diff line number Diff line Loading @@ -241,6 +241,8 @@ LDAP_DECLARE(int) util_ldap_connection_open(request_rec *r, int result = 0; int failures = 0; int version = LDAP_VERSION3; int rc = LDAP_SUCCESS; struct timeval timeOut = {10,0}; /* 10 second connection timeout */ util_ldap_state_t *st = (util_ldap_state_t *)ap_get_module_config( r->server->module_config, &ldap_module); Loading Loading @@ -317,6 +319,19 @@ LDAP_DECLARE(int) util_ldap_connection_open(request_rec *r, /* always default to LDAP V3 */ ldap_set_option(ldc->ldap, LDAP_OPT_PROTOCOL_VERSION, &version); #ifdef LDAP_OPT_NETWORK_TIMEOUT if (st->connectionTimeout > 0) { timeOut.tv_sec = st->connectionTimeout; } if (st->connectionTimeout >= 0) { rc = ldap_set_option(NULL, LDAP_OPT_NETWORK_TIMEOUT, (void *)&timeOut); if (APR_SUCCESS != rc) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, "LDAP: Could not set the connection timeout" ); } } #endif } Loading Loading @@ -1405,7 +1420,6 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, void *data; const char *userdata_key = "util_ldap_init"; struct timeval timeOut = {10,0}; /* 10 second connection timeout */ /* util_ldap_post_config() will be called twice. Don't bother * going through all of the initialization on the first call Loading Loading @@ -1630,20 +1644,6 @@ 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; } if (st->connectionTimeout >= 0) { rc = ldap_set_option(NULL, LDAP_OPT_NETWORK_TIMEOUT, (void *)&timeOut); if (APR_SUCCESS != rc) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "LDAP: Could not set the connection timeout" ); } } #endif return(OK); } Loading