From: Joe Orton Date: Mon, 23 Mar 2009 13:18:06 +0000 (+0000) Subject: * modules/cache/mod_socache_memcache.c, X-Git-Tag: 2.3.2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e1286998c46527d18a92438012738f452275aa4e;p=apache * 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@757396 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/cache/mod_socache_dbm.c b/modules/cache/mod_socache_dbm.c index 2886400840..63dece307d 100644 --- a/modules/cache/mod_socache_dbm.c +++ b/modules/cache/mod_socache_dbm.c @@ -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; diff --git a/modules/cache/mod_socache_memcache.c b/modules/cache/mod_socache_memcache.c index 0ac1c0019a..e1511cd35a 100644 --- a/modules/cache/mod_socache_memcache.c +++ b/modules/cache/mod_socache_memcache.c @@ -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. */ } diff --git a/modules/cache/mod_socache_shmcb.c b/modules/cache/mod_socache_shmcb.c index ceacc4e5c9..94ab25f1ef 100644 --- a/modules/cache/mod_socache_shmcb.c +++ b/modules/cache/mod_socache_shmcb.c @@ -40,16 +40,6 @@ #define DEFAULT_SHMCB_SUFFIX ".cache" - -/* - * This shared memory based SSL session cache implementation was - * originally written by Geoff Thorpe 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: %d seconds, (range: %d...%d)
", (int)(average_expiry - now),