summaryrefslogtreecommitdiffstats
path: root/modules/ssl/ssl_scache.c
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2008-03-04 17:14:10 +0100
committerJoe Orton <jorton@apache.org>2008-03-04 17:14:10 +0100
commit0bd3fe570427beda4d735323f1ddd2d9e08ffbfc (patch)
tree958581727bb46c58330958240308691cc7879c6f /modules/ssl/ssl_scache.c
parent* lfi is already a pointer in contrast fi which was used before. (diff)
downloadapache2-0bd3fe570427beda4d735323f1ddd2d9e08ffbfc.tar.xz
apache2-0bd3fe570427beda4d735323f1ddd2d9e08ffbfc.zip
Session cache interface redesign, Part 7:
Clean up provider interface, removing use of mod_ssl-specific types: * modules/ssl/ssl_private.h (modssl_sesscache_provider): Replace BOOL with apr_status_t, UCHAR with unsigned char; use 'unsigned int' for idlen; constify id arguments; remove pool argument from ->status. * modules/ssl/ssl_scache_dc.c, modules/ssl/ssl_scache_memcache, modules/ssl/ssl_scache_shmcb.c, modules/ssl_scache_dbm.c: Update accordingly. * modules/ssl/ssl_scache.c (ssl_scache_retrieve, ssl_scache_store): Adjust for BOOL->apr_status_t change. (ssl_ext_status_hook): Update for dropped pool argument. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@633526 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/ssl/ssl_scache.c')
-rw-r--r--modules/ssl/ssl_scache.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/ssl/ssl_scache.c b/modules/ssl/ssl_scache.c
index db4dad12e8..d096b7b929 100644
--- a/modules/ssl/ssl_scache.c
+++ b/modules/ssl/ssl_scache.c
@@ -90,7 +90,7 @@ BOOL ssl_scache_store(server_rec *s, UCHAR *id, int idlen,
SSLModConfigRec *mc = myModConfig(s);
unsigned char encoded[SSL_SESSION_MAX_DER], *ptr;
unsigned int len;
- BOOL rv;
+ apr_status_t rv;
/* Serialise the session. */
len = i2d_SSL_SESSION(sess, NULL);
@@ -114,7 +114,7 @@ BOOL ssl_scache_store(server_rec *s, UCHAR *id, int idlen,
ssl_mutex_off(s);
}
- return rv;
+ return rv == APR_SUCCESS ? TRUE : FALSE;
}
SSL_SESSION *ssl_scache_retrieve(server_rec *s, UCHAR *id, int idlen,
@@ -124,7 +124,7 @@ SSL_SESSION *ssl_scache_retrieve(server_rec *s, UCHAR *id, int idlen,
unsigned char dest[SSL_SESSION_MAX_DER];
unsigned int destlen = SSL_SESSION_MAX_DER;
MODSSL_D2I_SSL_SESSION_CONST unsigned char *ptr;
- BOOL rv;
+ apr_status_t rv;
if (mc->sesscache->flags & MODSSL_SESSCACHE_FLAG_NOTMPSAFE) {
ssl_mutex_on(s);
@@ -137,7 +137,7 @@ SSL_SESSION *ssl_scache_retrieve(server_rec *s, UCHAR *id, int idlen,
ssl_mutex_off(s);
}
- if (rv == FALSE) {
+ if (rv != APR_SUCCESS) {
return NULL;
}
@@ -185,7 +185,7 @@ static int ssl_ext_status_hook(request_rec *r, int flags)
ssl_mutex_on(r->server);
}
- mc->sesscache->status(mc->sesscache_context, r, flags, r->pool);
+ mc->sesscache->status(mc->sesscache_context, r, flags);
if (mc->sesscache->flags & MODSSL_SESSCACHE_FLAG_NOTMPSAFE) {
ssl_mutex_off(r->server);