httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r546707 - /httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c
Date Wed, 13 Jun 2007 02:10:04 GMT
Author: pquerna
Date: Tue Jun 12 19:10:04 2007
New Revision: 546707

URL: http://svn.apache.org/viewvc?view=rev&rev=546707
Log:
Make default values for memcache config defines, rather than inline constants.

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c?view=diff&rev=546707&r1=546706&r2=546707
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c Tue Jun 12 19:10:04 2007
@@ -52,6 +52,24 @@
 
 #define MC_KEY_LEN 254
 
+#ifndef MC_DEFAULT_SERVER_PORT
+#define MC_DEFAULT_SERVER_PORT 11211
+#endif
+
+
+#ifndef MC_DEFAULT_SERVER_MIN
+#define MC_DEFAULT_SERVER_MIN 0
+#endif
+
+#ifndef MC_DEFAULT_SERVER_SMAX
+#define MC_DEFAULT_SERVER_SMAX 1
+#endif
+
+#ifndef MC_DEFAULT_SERVER_TTL
+#define MC_DEFAULT_SERVER_TTL 600
+#endif
+
+
 void ssl_scache_mc_init(server_rec *s, apr_pool_t *p)
 {
     apr_status_t rv;
@@ -109,16 +127,15 @@
         }
 
         if (port == 0) {
-            port = 11211; /* default port */
+            port = MC_DEFAULT_SERVER_PORT;
         }
 
-        /* Should Max Conns be (thread_limit / nservers) ? */
         rv = apr_memcache_server_create(p,
                                         host_str, port,
-                                        0,
-                                        1,
-                                        thread_limit, 
-                                        600,
+                                        MC_DEFAULT_SERVER_MIN,
+                                        MC_DEFAULT_SERVER_SMAX,
+                                        thread_limit,
+                                        MC_DEFAULT_SERVER_TTL,
                                         &st);
         if (rv != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,



Mime
View raw message