From b59327cde81cddced2a35742bd203c242669d6dc Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Tue, 16 Nov 2010 15:05:00 +0100 Subject: GnuTLSCache can now take a single argument (none). --- src/gnutls_config.c | 5 +++++ src/gnutls_hooks.c | 3 --- src/mod_gnutls.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/gnutls_config.c b/src/gnutls_config.c index fc3e166..517dbfb 100644 --- a/src/gnutls_config.c +++ b/src/gnutls_config.c @@ -370,6 +370,8 @@ const char *mgs_set_cache(cmd_parms * parms, void *dummy, if (strcasecmp("none", type) == 0) { sc->cache_type = mgs_cache_none; + sc->cache_config = NULL; + return NULL; } else if (strcasecmp("dbm", type) == 0) { sc->cache_type = mgs_cache_dbm; } else if (strcasecmp("gdbm", type) == 0) { @@ -383,6 +385,9 @@ const char *mgs_set_cache(cmd_parms * parms, void *dummy, else { return "Invalid Type for GnuTLSCache!"; } + + if (arg == NULL) + return "Invalid argument 2 for GnuTLSCache!"; if (sc->cache_type == mgs_cache_dbm || sc->cache_type == mgs_cache_gdbm) { diff --git a/src/gnutls_hooks.c b/src/gnutls_hooks.c index 34c3585..2999aae 100644 --- a/src/gnutls_hooks.c +++ b/src/gnutls_hooks.c @@ -506,9 +506,6 @@ void mgs_hook_child_init(apr_pool_t * p, server_rec * s) ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "[GnuTLS] - Failed to run Cache Init"); } - } else { - ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, - "[GnuTLS] - No Cache Configured. Hint: GnuTLSCache"); } } diff --git a/src/mod_gnutls.c b/src/mod_gnutls.c index 49f4e43..713c2e6 100644 --- a/src/mod_gnutls.c +++ b/src/mod_gnutls.c @@ -119,7 +119,7 @@ static const command_rec mgs_config_cmds[] = { NULL, RSRC_CONF, "Cache Timeout"), - AP_INIT_TAKE2("GnuTLSCache", mgs_set_cache, + AP_INIT_TAKE12("GnuTLSCache", mgs_set_cache, NULL, RSRC_CONF, "Cache Configuration"), -- cgit