Changeset ce5f776 in mod_gnutls for src/gnutls_config.c


Ignore:
Timestamp:
May 2, 2018, 2:30:26 PM (2 years ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
debian/master, master, proxy-ticket
Children:
eaa8a9d
Parents:
5ab2868
Message:

Move config and post_config of a cache instance to separate functions

This prepares the infrastructure for multiple caches and simplifies
the server configuration structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_config.c

    r5ab2868 rce5f776  
    1818 */
    1919
     20#include "gnutls_cache.h"
    2021#include "gnutls_config.h"
    2122#include "mod_gnutls.h"
     
    595596    {
    596597        sc->cache_enable = GNUTLS_ENABLED_FALSE;
    597         sc->cache_type = NULL;
    598         sc->cache_config = NULL;
    599598        return NULL;
    600599    }
     
    606605    if (sep)
    607606    {
    608         sc->cache_type = apr_pstrmemdup(parms->pool, type, sep - type);
     607        type = apr_pstrmemdup(parms->temp_pool, type, sep - type);
    609608        if (arg != NULL)
    610609        {
     
    615614        arg = ++sep;
    616615    }
    617     else
    618         sc->cache_type = apr_pstrdup(parms->pool, type);
    619 
    620     if (arg == NULL)
    621         sc->cache_config = "";
    622     else
    623         sc->cache_config = apr_pstrdup(parms->pool, arg);
    624 
    625     return NULL;
     616
     617    return mgs_cache_inst_config(&sc->cache, parms->server,
     618                                 type, arg,
     619                                 parms->pool, parms->temp_pool);
    626620}
    627621
     
    860854    sc->priorities_str = NULL;
    861855    sc->cache_timeout = MGS_TIMEOUT_UNSET;
    862     sc->cache_type = NULL;
    863856    sc->cache_enable = GNUTLS_ENABLED_UNSET;
    864     sc->cache_config = NULL;
    865857    sc->cache = NULL;
    866858    sc->tickets = GNUTLS_ENABLED_UNSET;
Note: See TracChangeset for help on using the changeset viewer.