diff options
author | Nikos Mavrogiannopoulos | 2010-09-24 08:51:52 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos | 2010-09-24 08:51:52 +0200 |
commit | d8c7cf4677d744f0e203d30cca4e69d84cf4b7b4 (patch) | |
tree | 3d442c9ac0dd88d8aaaef8cb2e03a7d79170a0f2 /src/gnutls_cache.c | |
parent | 771ca63efe669f8b0a3ffaeba1f3be7e3688b35f (diff) |
Only allow two options for DB. Berkeley DB and gdbm. The other options
such as SDBM had serious limitations. Thanks to Hardy Griech for pointing out.
Diffstat (limited to 'src/gnutls_cache.c')
-rw-r--r-- | src/gnutls_cache.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gnutls_cache.c b/src/gnutls_cache.c index 7bcb697..90ea440 100644 --- a/src/gnutls_cache.c +++ b/src/gnutls_cache.c | |||
@@ -296,10 +296,10 @@ static int mc_cache_delete(void* baton, gnutls_datum_t key) | |||
296 | 296 | ||
297 | const char* db_type(mgs_srvconf_rec * sc) | 297 | const char* db_type(mgs_srvconf_rec * sc) |
298 | { | 298 | { |
299 | if (sc->cache_type == mgs_cache_sdbm) | 299 | if (sc->cache_type == mgs_cache_gdbm) |
300 | return "sdbm"; | 300 | return "gdbm"; |
301 | else | 301 | else |
302 | return "default"; | 302 | return "db"; |
303 | } | 303 | } |
304 | 304 | ||
305 | #define SSL_DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD ) | 305 | #define SSL_DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD ) |
@@ -555,7 +555,7 @@ static int dbm_cache_post_config(apr_pool_t *p, server_rec *s, | |||
555 | int mgs_cache_post_config(apr_pool_t *p, server_rec *s, | 555 | int mgs_cache_post_config(apr_pool_t *p, server_rec *s, |
556 | mgs_srvconf_rec *sc) | 556 | mgs_srvconf_rec *sc) |
557 | { | 557 | { |
558 | if (sc->cache_type == mgs_cache_dbm || sc->cache_type == mgs_cache_sdbm) { | 558 | if (sc->cache_type == mgs_cache_dbm || sc->cache_type == mgs_cache_gdbm) { |
559 | return dbm_cache_post_config(p, s, sc); | 559 | return dbm_cache_post_config(p, s, sc); |
560 | } | 560 | } |
561 | return 0; | 561 | return 0; |
@@ -564,7 +564,7 @@ int mgs_cache_post_config(apr_pool_t *p, server_rec *s, | |||
564 | int mgs_cache_child_init(apr_pool_t *p, server_rec *s, | 564 | int mgs_cache_child_init(apr_pool_t *p, server_rec *s, |
565 | mgs_srvconf_rec *sc) | 565 | mgs_srvconf_rec *sc) |
566 | { | 566 | { |
567 | if (sc->cache_type == mgs_cache_dbm || sc->cache_type == mgs_cache_sdbm) { | 567 | if (sc->cache_type == mgs_cache_dbm || sc->cache_type == mgs_cache_gdbm) { |
568 | return 0; | 568 | return 0; |
569 | } | 569 | } |
570 | #if HAVE_APR_MEMCACHE | 570 | #if HAVE_APR_MEMCACHE |
@@ -579,7 +579,7 @@ int mgs_cache_child_init(apr_pool_t *p, server_rec *s, | |||
579 | 579 | ||
580 | int mgs_cache_session_init(mgs_handle_t *ctxt) | 580 | int mgs_cache_session_init(mgs_handle_t *ctxt) |
581 | { | 581 | { |
582 | if (ctxt->sc->cache_type == mgs_cache_dbm || ctxt->sc->cache_type == mgs_cache_sdbm) { | 582 | if (ctxt->sc->cache_type == mgs_cache_dbm || ctxt->sc->cache_type == mgs_cache_gdbm) { |
583 | gnutls_db_set_retrieve_function(ctxt->session, dbm_cache_fetch); | 583 | gnutls_db_set_retrieve_function(ctxt->session, dbm_cache_fetch); |
584 | gnutls_db_set_remove_function(ctxt->session, dbm_cache_delete); | 584 | gnutls_db_set_remove_function(ctxt->session, dbm_cache_delete); |
585 | gnutls_db_set_store_function(ctxt->session, dbm_cache_store); | 585 | gnutls_db_set_store_function(ctxt->session, dbm_cache_store); |