httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1086432 - in /httpd/httpd/trunk: include/ap_mmn.h include/util_ldap.h modules/ldap/util_ldap.c
Date Mon, 28 Mar 2011 22:40:21 GMT
Author: covener
Date: Mon Mar 28 22:40:20 2011
New Revision: 1086432

URL: http://svn.apache.org/viewvc?rev=1086432&view=rev
Log:
fix incorrect type of LDAP connection pool member, fix naming fors
style guidlines


Modified:
    httpd/httpd/trunk/include/ap_mmn.h
    httpd/httpd/trunk/include/util_ldap.h
    httpd/httpd/trunk/modules/ldap/util_ldap.c

Modified: httpd/httpd/trunk/include/ap_mmn.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_mmn.h?rev=1086432&r1=1086431&r2=1086432&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_mmn.h (original)
+++ httpd/httpd/trunk/include/ap_mmn.h Mon Mar 28 22:40:20 2011
@@ -307,14 +307,16 @@
                            util_ldap_connection_t.freed, and
                            util_ldap_connection_t.rebind_pool. 
  * 20110312.1 (2.3.12-dev) Add core_dir_config.decode_encoded_slashes.
+ * 20110328.0 (2.3.12-dev) change type and name of connectionPoolTTL in util_ldap_state_t

+                           connectionPoolTTL (connection_pool_ttl, int->apr_interval_t)
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
 
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20110312
+#define MODULE_MAGIC_NUMBER_MAJOR 20110328
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 1                     /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 0                    /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a

Modified: httpd/httpd/trunk/include/util_ldap.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/util_ldap.h?rev=1086432&r1=1086431&r2=1086432&view=diff
==============================================================================
--- httpd/httpd/trunk/include/util_ldap.h (original)
+++ httpd/httpd/trunk/include/util_ldap.h Mon Mar 28 22:40:20 2011
@@ -165,7 +165,7 @@ typedef struct util_ldap_state_t {
     struct timeval *opTimeout;
 
     int debug_level;                    /* SDK debug level */
-    int connectionPoolTTL;
+    apr_interval_time_t connection_pool_ttl;
 } util_ldap_state_t;
 
 /* Used to store arrays of attribute labels/values. */

Modified: httpd/httpd/trunk/modules/ldap/util_ldap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/util_ldap.c?rev=1086432&r1=1086431&r2=1086432&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ldap/util_ldap.c (original)
+++ httpd/httpd/trunk/modules/ldap/util_ldap.c Mon Mar 28 22:40:20 2011
@@ -668,8 +668,8 @@ static util_ldap_connection_t *
             && (l->deref == deref) && (l->secure == secureflag)
             && !compare_client_certs(dc->client_certs, l->client_certs))
         {
-            if (st->connectionPoolTTL > 0) { 
-                if (l->bound && (now - l->freed) > st->connectionPoolTTL)
{ 
+            if (st->connection_pool_ttl > 0) { 
+                if (l->bound && (now - l->freed) > st->connection_pool_ttl)
{ 
                     ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, 
                                   "Removing LDAP connection last used %" APR_TIME_T_FMT "
seconds ago", 
                                   (now - l->freed) / APR_USEC_PER_SEC);
@@ -706,7 +706,7 @@ static util_ldap_connection_t *
                 !compare_client_certs(dc->client_certs, l->client_certs))
             {
                 /* the bind credentials have changed */
-                /* no check for connectionPoolTTL, since we are unbinding any way */
+                /* no check for connection_pool_ttl, since we are unbinding any way */
                 uldap_connection_unbind(l);
                         
                 util_ldap_strdup((char**)&(l->binddn), binddn);
@@ -776,7 +776,7 @@ static util_ldap_connection_t *
         l->client_certs = apr_array_copy_hdr(l->pool, dc->client_certs);
 
         /* whether or not to keep this connection in the pool when it's returned */
-        l->keep = (st->connectionPoolTTL == 0) ? 0 : 1;
+        l->keep = (st->connection_pool_ttl == 0) ? 0 : 1;
 
         if (l->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) { 
             if (apr_pool_create(&(l->rebind_pool), l->pool) != APR_SUCCESS) {
@@ -2590,7 +2590,7 @@ static const char *util_ldap_set_conn_tt
         /* reserve -1 for default value */
         timeout =  AP_LDAP_CONNPOOL_INFINITE;
     }
-    st->connectionPoolTTL = timeout;
+    st->connection_pool_ttl = timeout;
     return NULL;
 }
 
@@ -2624,7 +2624,7 @@ static void *util_ldap_create_config(apr
     st->opTimeout = apr_pcalloc(p, sizeof(struct timeval));
     st->opTimeout->tv_sec = 60;
     st->verify_svr_cert = 1;
-    st->connectionPoolTTL = AP_LDAP_CONNPOOL_DEFAULT; /* no limit */
+    st->connection_pool_ttl = AP_LDAP_CONNPOOL_DEFAULT; /* no limit */
 
     return st;
 }
@@ -2676,8 +2676,8 @@ static void *util_ldap_merge_config(apr_
     st->verify_svr_cert = base->verify_svr_cert;
     st->debug_level = base->debug_level;
 
-    st->connectionPoolTTL = (overrides->connectionPoolTTL == AP_LDAP_CONNPOOL_DEFAULT)
? 
-                                base->connectionPoolTTL : overrides->connectionPoolTTL;
+    st->connection_pool_ttl = (overrides->connection_pool_ttl == AP_LDAP_CONNPOOL_DEFAULT)
? 
+                                base->connection_pool_ttl : overrides->connection_pool_ttl;
 
     return st;
 }



Mime
View raw message