]> granicus.if.org Git - apache/commitdiff
* modules/cache/mod_socache_memcache.c,
authorJoe Orton <jorton@apache.org>
Mon, 23 Mar 2009 13:18:06 +0000 (13:18 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 23 Mar 2009 13:18:06 +0000 (13:18 +0000)
  modules/cache/mod_socache_shmcb.c, modules/cache/mod_socache_dbm.c:
  Remove references to "SSL" throughout comments and code.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@757396 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/mod_socache_dbm.c
modules/cache/mod_socache_memcache.c
modules/cache/mod_socache_shmcb.c

index 28864008402d168d2c8d89cff334d8945c48b900..63dece307d5be9eb0646aa08fe5428e72b0ecdad 100644 (file)
@@ -51,7 +51,7 @@ struct ap_socache_instance_t {
 /**
  * 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 @@ struct ap_socache_instance_t {
 #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 @@ static apr_status_t socache_dbm_init(ap_socache_instance_t *ctx,
     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 @@ static apr_status_t socache_dbm_init(ap_socache_instance_t *ctx,
      */
     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 apr_status_t socache_dbm_init(ap_socache_instance_t *ctx,
 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 @@ static apr_status_t socache_dbm_store(ap_socache_instance_t *ctx,
     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 @@ static apr_status_t socache_dbm_store(ap_socache_instance_t *ctx,
     }
     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 @@ static apr_status_t socache_dbm_retrieve(ap_socache_instance_t *ctx, server_rec
      */
     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 @@ static apr_status_t socache_dbm_remove(ap_socache_instance_t *ctx,
     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 @@ static void socache_dbm_expire(ap_socache_instance_t *ctx, server_rec *s)
         /* 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 @@ static void socache_dbm_expire(ap_socache_instance_t *ctx, server_rec *s)
 
         /* 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 @@ static void socache_dbm_status(ap_socache_instance_t *ctx, request_rec *r,
 
     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;
index 0ac1c0019abe3005f3845950541c47675e09759d..e1511cd35aa350aeab6477f5086a0b49ec743c11 100644 (file)
@@ -283,7 +283,6 @@ static apr_status_t socache_mc_remove(ap_socache_instance_t *ctx, server_rec *s,
 
 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. */
 }
 
index ceacc4e5c9b1acedf44a08f894d8506108b03785..94ab25f1ef73c2710ece11057be95cf989db0dee 100644 (file)
 
 #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 @@ struct ap_socache_instance_t {
  * 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 @@ static void socache_shmcb_status(ap_socache_instance_t *ctx,
                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),