Skip to content

Commit d7faf37

Browse files
committed
* 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
1 parent 063abd0 commit d7faf37

3 files changed

Lines changed: 29 additions & 40 deletions

File tree

modules/cache/mod_socache_dbm.c

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct ap_socache_instance_t {
5151
/**
5252
* Support for DBM library
5353
*/
54-
#define SSL_DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )
54+
#define DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )
5555

5656
/* Check for definition of DEFAULT_REL_RUNTIMEDIR */
5757
#ifndef DEFAULT_REL_RUNTIMEDIR
@@ -61,16 +61,16 @@ struct ap_socache_instance_t {
6161
#endif
6262

6363
/* ### this should use apr_dbm_usednames. */
64-
#if !defined(SSL_DBM_FILE_SUFFIX_DIR) && !defined(SSL_DBM_FILE_SUFFIX_PAG)
64+
#if !defined(DBM_FILE_SUFFIX_DIR) && !defined(DBM_FILE_SUFFIX_PAG)
6565
#if defined(DBM_SUFFIX)
66-
#define SSL_DBM_FILE_SUFFIX_DIR DBM_SUFFIX
67-
#define SSL_DBM_FILE_SUFFIX_PAG DBM_SUFFIX
66+
#define DBM_FILE_SUFFIX_DIR DBM_SUFFIX
67+
#define DBM_FILE_SUFFIX_PAG DBM_SUFFIX
6868
#elif defined(__FreeBSD__) || (defined(DB_LOCK) && defined(DB_SHMEM))
69-
#define SSL_DBM_FILE_SUFFIX_DIR ".db"
70-
#define SSL_DBM_FILE_SUFFIX_PAG ".db"
69+
#define DBM_FILE_SUFFIX_DIR ".db"
70+
#define DBM_FILE_SUFFIX_PAG ".db"
7171
#else
72-
#define SSL_DBM_FILE_SUFFIX_DIR ".dir"
73-
#define SSL_DBM_FILE_SUFFIX_PAG ".pag"
72+
#define DBM_FILE_SUFFIX_DIR ".dir"
73+
#define DBM_FILE_SUFFIX_PAG ".pag"
7474
#endif
7575
#endif
7676

@@ -127,9 +127,9 @@ static apr_status_t socache_dbm_init(ap_socache_instance_t *ctx,
127127
apr_pool_clear(ctx->pool);
128128

129129
if ((rv = apr_dbm_open(&dbm, ctx->data_file,
130-
APR_DBM_RWCREATE, SSL_DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
130+
APR_DBM_RWCREATE, DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
131131
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
132-
"Cannot create SSLSessionCache DBM file `%s'",
132+
"Cannot create socache DBM file `%s'",
133133
ctx->data_file);
134134
return rv;
135135
}
@@ -146,14 +146,14 @@ static apr_status_t socache_dbm_init(ap_socache_instance_t *ctx,
146146
*/
147147
if (geteuid() == 0 /* is superuser */) {
148148
chown(ctx->data_file, ap_unixd_config.user_id, -1 /* no gid change */);
149-
if (chown(apr_pstrcat(p, ctx->data_file, SSL_DBM_FILE_SUFFIX_DIR, NULL),
149+
if (chown(apr_pstrcat(p, ctx->data_file, DBM_FILE_SUFFIX_DIR, NULL),
150150
ap_unixd_config.user_id, -1) == -1) {
151151
if (chown(apr_pstrcat(p, ctx->data_file, ".db", NULL),
152152
ap_unixd_config.user_id, -1) == -1)
153153
chown(apr_pstrcat(p, ctx->data_file, ".dir", NULL),
154154
ap_unixd_config.user_id, -1);
155155
}
156-
if (chown(apr_pstrcat(p, ctx->data_file, SSL_DBM_FILE_SUFFIX_PAG, NULL),
156+
if (chown(apr_pstrcat(p, ctx->data_file, DBM_FILE_SUFFIX_PAG, NULL),
157157
ap_unixd_config.user_id, -1) == -1) {
158158
if (chown(apr_pstrcat(p, ctx->data_file, ".db", NULL),
159159
ap_unixd_config.user_id, -1) == -1)
@@ -170,8 +170,8 @@ static apr_status_t socache_dbm_init(ap_socache_instance_t *ctx,
170170
static void socache_dbm_kill(ap_socache_instance_t *ctx, server_rec *s)
171171
{
172172
/* the correct way */
173-
unlink(apr_pstrcat(ctx->pool, ctx->data_file, SSL_DBM_FILE_SUFFIX_DIR, NULL));
174-
unlink(apr_pstrcat(ctx->pool, ctx->data_file, SSL_DBM_FILE_SUFFIX_PAG, NULL));
173+
unlink(apr_pstrcat(ctx->pool, ctx->data_file, DBM_FILE_SUFFIX_DIR, NULL));
174+
unlink(apr_pstrcat(ctx->pool, ctx->data_file, DBM_FILE_SUFFIX_PAG, NULL));
175175
/* the additional ways to be sure */
176176
unlink(apr_pstrcat(ctx->pool, ctx->data_file, ".dir", NULL));
177177
unlink(apr_pstrcat(ctx->pool, ctx->data_file, ".pag", NULL));
@@ -228,17 +228,17 @@ static apr_status_t socache_dbm_store(ap_socache_instance_t *ctx,
228228
apr_pool_clear(ctx->pool);
229229

230230
if ((rv = apr_dbm_open(&dbm, ctx->data_file,
231-
APR_DBM_RWCREATE, SSL_DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
231+
APR_DBM_RWCREATE, DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
232232
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
233-
"Cannot open SSLSessionCache DBM file `%s' for writing "
233+
"Cannot open socache DBM file `%s' for writing "
234234
"(store)",
235235
ctx->data_file);
236236
free(dbmval.dptr);
237237
return rv;
238238
}
239239
if ((rv = apr_dbm_store(dbm, dbmkey, dbmval)) != APR_SUCCESS) {
240240
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
241-
"Cannot store SSL session to DBM file `%s'",
241+
"Cannot store socache object to DBM file `%s'",
242242
ctx->data_file);
243243
apr_dbm_close(dbm);
244244
free(dbmval.dptr);
@@ -281,9 +281,9 @@ static apr_status_t socache_dbm_retrieve(ap_socache_instance_t *ctx, server_rec
281281
*/
282282
apr_pool_clear(ctx->pool);
283283
if ((rc = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE,
284-
SSL_DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
284+
DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
285285
ap_log_error(APLOG_MARK, APLOG_ERR, rc, s,
286-
"Cannot open SSLSessionCache DBM file `%s' for reading "
286+
"Cannot open socache DBM file `%s' for reading "
287287
"(fetch)",
288288
ctx->data_file);
289289
return rc;
@@ -337,9 +337,9 @@ static apr_status_t socache_dbm_remove(ap_socache_instance_t *ctx,
337337
apr_pool_clear(ctx->pool);
338338

339339
if ((rv = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE,
340-
SSL_DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
340+
DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
341341
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
342-
"Cannot open SSLSessionCache DBM file `%s' for writing "
342+
"Cannot open socache DBM file `%s' for writing "
343343
"(delete)",
344344
ctx->data_file);
345345
return rv;
@@ -401,9 +401,9 @@ static void socache_dbm_expire(ap_socache_instance_t *ctx, server_rec *s)
401401
/* pass 1: scan DBM database */
402402
keyidx = 0;
403403
if ((rv = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE,
404-
SSL_DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
404+
DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
405405
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
406-
"Cannot open SSLSessionCache DBM file `%s' for "
406+
"Cannot open socache DBM file `%s' for "
407407
"scanning",
408408
ctx->data_file);
409409
break;
@@ -434,9 +434,9 @@ static void socache_dbm_expire(ap_socache_instance_t *ctx, server_rec *s)
434434

435435
/* pass 2: delete expired elements */
436436
if (apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE,
437-
SSL_DBM_FILE_MODE, ctx->pool) != APR_SUCCESS) {
437+
DBM_FILE_MODE, ctx->pool) != APR_SUCCESS) {
438438
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
439-
"Cannot re-open SSLSessionCache DBM file `%s' for "
439+
"Cannot re-open socache DBM file `%s' for "
440440
"expiring",
441441
ctx->data_file);
442442
break;
@@ -473,9 +473,9 @@ static void socache_dbm_status(ap_socache_instance_t *ctx, request_rec *r,
473473

474474
apr_pool_clear(ctx->pool);
475475
if ((rv = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE,
476-
SSL_DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
476+
DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
477477
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
478-
"Cannot open SSLSessionCache DBM file `%s' for status "
478+
"Cannot open socache DBM file `%s' for status "
479479
"retrival",
480480
ctx->data_file);
481481
return;

modules/cache/mod_socache_memcache.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ static apr_status_t socache_mc_remove(ap_socache_instance_t *ctx, server_rec *s,
283283

284284
static void socache_mc_status(ap_socache_instance_t *ctx, request_rec *r, int flags)
285285
{
286-
/* SSLModConfigRec *mc = myModConfig(r->server); */
287286
/* TODO: Make a mod_status handler. meh. */
288287
}
289288

modules/cache/mod_socache_shmcb.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@
4040

4141
#define DEFAULT_SHMCB_SUFFIX ".cache"
4242

43-
44-
/*
45-
* This shared memory based SSL session cache implementation was
46-
* originally written by Geoff Thorpe <geoff geoffthorpe.net> for C2Net
47-
* Europe as a contribution to Ralf Engelschall's mod_ssl project.
48-
*
49-
* Since rewritten by GT to not use alignment-fudging memcpys and reduce
50-
* complexity.
51-
*/
52-
5343
/*
5444
* Header structure - the start of the shared-mem segment
5545
*/
@@ -135,7 +125,7 @@ struct ap_socache_instance_t {
135125
* index of the first in use, subcache->idx_used gives the number in
136126
* use. Both ->idx_* values have a range of [0, header->index_num)
137127
*
138-
* Each in-use SHMCBIndex structure represents a single SSL session.
128+
* Each in-use SHMCBIndex structure represents a single cached object.
139129
* The ID and data segment are stored consecutively in the subcache's
140130
* cyclic data buffer. The "Data" segment can thus be seen to
141131
* look like this, for example
@@ -584,7 +574,7 @@ static void socache_shmcb_status(ap_socache_instance_t *ctx,
584574
header->subcache_num, header->index_num);
585575
if (non_empty_subcaches) {
586576
average_expiry = (time_t)(expiry_total / (double)non_empty_subcaches);
587-
ap_rprintf(r, "time left on oldest entries' SSL sessions: ");
577+
ap_rprintf(r, "time left on oldest entries' objects: ");
588578
if (now < average_expiry)
589579
ap_rprintf(r, "avg: <b>%d</b> seconds, (range: %d...%d)<br>",
590580
(int)(average_expiry - now),

0 commit comments

Comments
 (0)