httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r757396 - in /httpd/httpd/trunk/modules/cache: mod_socache_dbm.c mod_socache_memcache.c mod_socache_shmcb.c
Date Mon, 23 Mar 2009 13:18:09 GMT
Author: jorton
Date: Mon Mar 23 13:18:06 2009
New Revision: 757396

URL: http://svn.apache.org/viewvc?rev=757396&view=rev
Log:
* modules/cache/mod_socache_memcache.c,
  modules/cache/mod_socache_shmcb.c, modules/cache/mod_socache_dbm.c:
  Remove references to "SSL" throughout comments and code.

Modified:
    httpd/httpd/trunk/modules/cache/mod_socache_dbm.c
    httpd/httpd/trunk/modules/cache/mod_socache_memcache.c
    httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c

Modified: httpd/httpd/trunk/modules/cache/mod_socache_dbm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_socache_dbm.c?rev=757396&r1=757395&r2=757396&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_socache_dbm.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_socache_dbm.c Mon Mar 23 13:18:06 2009
@@ -51,7 +51,7 @@
 /**
  * Support for DBM library
  */
-#define SSL_DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )
+#define DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )
 
 /* Check for definition of DEFAULT_REL_RUNTIMEDIR */
 #ifndef DEFAULT_REL_RUNTIMEDIR
@@ -61,16 +61,16 @@
 #endif
 
 /* ### this should use apr_dbm_usednames. */
-#if !defined(SSL_DBM_FILE_SUFFIX_DIR) && !defined(SSL_DBM_FILE_SUFFIX_PAG)
+#if !defined(DBM_FILE_SUFFIX_DIR) && !defined(DBM_FILE_SUFFIX_PAG)
 #if defined(DBM_SUFFIX)
-#define SSL_DBM_FILE_SUFFIX_DIR DBM_SUFFIX
-#define SSL_DBM_FILE_SUFFIX_PAG DBM_SUFFIX
+#define DBM_FILE_SUFFIX_DIR DBM_SUFFIX
+#define DBM_FILE_SUFFIX_PAG DBM_SUFFIX
 #elif defined(__FreeBSD__) || (defined(DB_LOCK) && defined(DB_SHMEM))
-#define SSL_DBM_FILE_SUFFIX_DIR ".db"
-#define SSL_DBM_FILE_SUFFIX_PAG ".db"
+#define DBM_FILE_SUFFIX_DIR ".db"
+#define DBM_FILE_SUFFIX_PAG ".db"
 #else
-#define SSL_DBM_FILE_SUFFIX_DIR ".dir"
-#define SSL_DBM_FILE_SUFFIX_PAG ".pag"
+#define DBM_FILE_SUFFIX_DIR ".dir"
+#define DBM_FILE_SUFFIX_PAG ".pag"
 #endif
 #endif
 
@@ -127,9 +127,9 @@
     apr_pool_clear(ctx->pool);
 
     if ((rv = apr_dbm_open(&dbm, ctx->data_file,
-            APR_DBM_RWCREATE, SSL_DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
+            APR_DBM_RWCREATE, DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
-                     "Cannot create SSLSessionCache DBM file `%s'",
+                     "Cannot create socache DBM file `%s'",
                      ctx->data_file);
         return rv;
     }
@@ -146,14 +146,14 @@
      */
     if (geteuid() == 0 /* is superuser */) {
         chown(ctx->data_file, ap_unixd_config.user_id, -1 /* no gid change */);
-        if (chown(apr_pstrcat(p, ctx->data_file, SSL_DBM_FILE_SUFFIX_DIR, NULL),
+        if (chown(apr_pstrcat(p, ctx->data_file, DBM_FILE_SUFFIX_DIR, NULL),
                   ap_unixd_config.user_id, -1) == -1) {
             if (chown(apr_pstrcat(p, ctx->data_file, ".db", NULL),
                       ap_unixd_config.user_id, -1) == -1)
                 chown(apr_pstrcat(p, ctx->data_file, ".dir", NULL),
                       ap_unixd_config.user_id, -1);
         }
-        if (chown(apr_pstrcat(p, ctx->data_file, SSL_DBM_FILE_SUFFIX_PAG, NULL),
+        if (chown(apr_pstrcat(p, ctx->data_file, DBM_FILE_SUFFIX_PAG, NULL),
                   ap_unixd_config.user_id, -1) == -1) {
             if (chown(apr_pstrcat(p, ctx->data_file, ".db", NULL),
                       ap_unixd_config.user_id, -1) == -1)
@@ -170,8 +170,8 @@
 static void socache_dbm_kill(ap_socache_instance_t *ctx, server_rec *s)
 {
     /* the correct way */
-    unlink(apr_pstrcat(ctx->pool, ctx->data_file, SSL_DBM_FILE_SUFFIX_DIR, NULL));
-    unlink(apr_pstrcat(ctx->pool, ctx->data_file, SSL_DBM_FILE_SUFFIX_PAG, NULL));
+    unlink(apr_pstrcat(ctx->pool, ctx->data_file, DBM_FILE_SUFFIX_DIR, NULL));
+    unlink(apr_pstrcat(ctx->pool, ctx->data_file, DBM_FILE_SUFFIX_PAG, NULL));
     /* the additional ways to be sure */
     unlink(apr_pstrcat(ctx->pool, ctx->data_file, ".dir", NULL));
     unlink(apr_pstrcat(ctx->pool, ctx->data_file, ".pag", NULL));
@@ -228,9 +228,9 @@
     apr_pool_clear(ctx->pool);
 
     if ((rv = apr_dbm_open(&dbm, ctx->data_file,
-                           APR_DBM_RWCREATE, SSL_DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS)
{
+                           APR_DBM_RWCREATE, DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS)
{
         ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
-                     "Cannot open SSLSessionCache DBM file `%s' for writing "
+                     "Cannot open socache DBM file `%s' for writing "
                      "(store)",
                      ctx->data_file);
         free(dbmval.dptr);
@@ -238,7 +238,7 @@
     }
     if ((rv = apr_dbm_store(dbm, dbmkey, dbmval)) != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
-                     "Cannot store SSL session to DBM file `%s'",
+                     "Cannot store socache object to DBM file `%s'",
                      ctx->data_file);
         apr_dbm_close(dbm);
         free(dbmval.dptr);
@@ -281,9 +281,9 @@
      */
     apr_pool_clear(ctx->pool);
     if ((rc = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE, 
-                           SSL_DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
+                           DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, rc, s,
-                     "Cannot open SSLSessionCache DBM file `%s' for reading "
+                     "Cannot open socache DBM file `%s' for reading "
                      "(fetch)",
                      ctx->data_file);
         return rc;
@@ -337,9 +337,9 @@
     apr_pool_clear(ctx->pool);
 
     if ((rv = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE, 
-                           SSL_DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
+                           DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
-                     "Cannot open SSLSessionCache DBM file `%s' for writing "
+                     "Cannot open socache DBM file `%s' for writing "
                      "(delete)",
                      ctx->data_file);
         return rv;
@@ -401,9 +401,9 @@
         /* pass 1: scan DBM database */
         keyidx = 0;
         if ((rv = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE,
-                               SSL_DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
+                               DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
-                         "Cannot open SSLSessionCache DBM file `%s' for "
+                         "Cannot open socache DBM file `%s' for "
                          "scanning",
                          ctx->data_file);
             break;
@@ -434,9 +434,9 @@
 
         /* pass 2: delete expired elements */
         if (apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE,
-                         SSL_DBM_FILE_MODE, ctx->pool) != APR_SUCCESS) {
+                         DBM_FILE_MODE, ctx->pool) != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
-                         "Cannot re-open SSLSessionCache DBM file `%s' for "
+                         "Cannot re-open socache DBM file `%s' for "
                          "expiring",
                          ctx->data_file);
             break;
@@ -473,9 +473,9 @@
 
     apr_pool_clear(ctx->pool);
     if ((rv = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE, 
-                           SSL_DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
+                           DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
-                     "Cannot open SSLSessionCache DBM file `%s' for status "
+                     "Cannot open socache DBM file `%s' for status "
                      "retrival",
                      ctx->data_file);
         return;

Modified: httpd/httpd/trunk/modules/cache/mod_socache_memcache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_socache_memcache.c?rev=757396&r1=757395&r2=757396&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_socache_memcache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_socache_memcache.c Mon Mar 23 13:18:06 2009
@@ -283,7 +283,6 @@
 
 static void socache_mc_status(ap_socache_instance_t *ctx, request_rec *r, int flags)
 {
-    /* SSLModConfigRec *mc = myModConfig(r->server); */
     /* TODO: Make a mod_status handler. meh. */
 }
 

Modified: httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c?rev=757396&r1=757395&r2=757396&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c Mon Mar 23 13:18:06 2009
@@ -40,16 +40,6 @@
 
 #define DEFAULT_SHMCB_SUFFIX ".cache"
 
-
-/* 
- * This shared memory based SSL session cache implementation was
- * originally written by Geoff Thorpe <geoff geoffthorpe.net> for C2Net
- * Europe as a contribution to Ralf Engelschall's mod_ssl project.
- *
- * Since rewritten by GT to not use alignment-fudging memcpys and reduce
- * complexity.
- */
-
 /*
  * Header structure - the start of the shared-mem segment
  */
@@ -135,7 +125,7 @@
  * index of the first in use, subcache->idx_used gives the number in
  * use.  Both ->idx_* values have a range of [0, header->index_num)
  *
- * Each in-use SHMCBIndex structure represents a single SSL session.
+ * Each in-use SHMCBIndex structure represents a single cached object.
  * The ID and data segment are stored consecutively in the subcache's
  * cyclic data buffer.  The "Data" segment can thus be seen to 
  * look like this, for example
@@ -584,7 +574,7 @@
                header->subcache_num, header->index_num);
     if (non_empty_subcaches) {
         average_expiry = (time_t)(expiry_total / (double)non_empty_subcaches);
-        ap_rprintf(r, "time left on oldest entries' SSL sessions: ");
+        ap_rprintf(r, "time left on oldest entries' objects: ");
         if (now < average_expiry)
             ap_rprintf(r, "avg: <b>%d</b> seconds, (range: %d...%d)<br>",
                        (int)(average_expiry - now),



Mime
View raw message