Changeset 6945efb in mod_gnutls


Ignore:
Timestamp:
Apr 19, 2018, 2:47:40 PM (3 years ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
asyncio, debian/master, master, proxy-ticket
Children:
3656df0
Parents:
3381559
Message:

mc_cache_fetch: Don't require a connection context

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_cache.c

    r3381559 r6945efb  
    292292}
    293293
    294 static gnutls_datum_t mc_cache_fetch(conn_rec *c, const char *key)
     294/**
     295 * @param s server reference for logging
     296 * @param key the key to fetch
     297 * @param pool pool from which to allocate memory for the result
     298 */
     299static gnutls_datum_t mc_cache_fetch(server_rec *s, const char *key,
     300                                     apr_pool_t *pool)
    295301{
    296302    apr_status_t rv = APR_SUCCESS;
     
    299305    gnutls_datum_t data = {NULL, 0};
    300306
    301     rv = apr_memcache_getp(mc, c->pool, key, &value, &value_len, NULL);
     307    rv = apr_memcache_getp(mc, pool, key, &value, &value_len, NULL);
    302308
    303309    if (rv != APR_SUCCESS)
    304310    {
    305 #if MOD_GNUTLS_DEBUG
    306         ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c,
    307                       "error fetching key '%s'",
    308                       key);
    309 #endif
     311        ap_log_error(APLOG_MARK, APLOG_TRACE2, rv, s,
     312                     "error fetching key '%s'",
     313                     key);
    310314        return data;
    311315    }
     
    331335
    332336    const char *strkey = apr_psprintf(ctxt->c->pool, MC_TAG "%s", hex);
    333     return mc_cache_fetch(ctxt->c, strkey);
     337    return mc_cache_fetch(ctxt->c->base_server, strkey, ctxt->c->pool);
    334338}
    335339
     
    343347        return data;
    344348
    345     return mc_cache_fetch(ctxt->c, strkey);
     349    return mc_cache_fetch(ctxt->c->base_server, strkey, ctxt->c->pool);
    346350}
    347351
Note: See TracChangeset for help on using the changeset viewer.