Changeset a314ec9 in mod_gnutls
- Timestamp:
- Apr 29, 2018, 6:01:12 AM (5 years ago)
- Branches:
- asyncio, debian/master, master, proxy-ticket
- Children:
- d8d6b1e
- Parents:
- b94aee2
- git-author:
- Fiona Klute <fiona.klute@…> (04/29/18 05:56:04)
- git-committer:
- Fiona Klute <fiona.klute@…> (04/29/18 06:01:12)
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_cache.c
rb94aee2 ra314ec9 118 118 if (rv != APR_SUCCESS) 119 119 { 120 // TODO: clean up sc->cache_config reference121 120 ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, server, 122 121 "error storing in cache '%s:%s'", 123 cache->prov->name, sc->cache _config);122 cache->prov->name, sc->cache->config); 124 123 apr_pool_destroy(spool); 125 124 return -1; 126 125 } 127 126 128 // TODO: clean up sc->cache_config reference129 127 ap_log_error(APLOG_MARK, APLOG_TRACE1, rv, server, 130 128 "stored %u bytes of data (%u byte key) in cache '%s:%s'", 131 129 data.size, key.size, 132 cache->prov->name, sc->cache _config);130 cache->prov->name, sc->cache->config); 133 131 apr_pool_destroy(spool); 134 132 return 0; … … 169 167 // 4K should be enough for OCSP responses and sessions alike 170 168 #define SOCACHE_FETCH_BUF_SIZE 4096 171 gnutls_datum_t mgs_cache_fetch(mgs_cache_t cache __attribute__((unused)), 172 server_rec *server, gnutls_datum_t key, 173 apr_pool_t *pool) 169 gnutls_datum_t mgs_cache_fetch(mgs_cache_t cache, server_rec *server, 170 gnutls_datum_t key, apr_pool_t *pool) 174 171 { 175 172 mgs_srvconf_rec *sc = (mgs_srvconf_rec *) … … 196 193 if (rv != APR_SUCCESS) 197 194 { 198 // TODO: clean up sc->cache_config references199 195 /* APR_NOTFOUND means there's no such object. */ 200 196 if (rv == APR_NOTFOUND) 201 197 ap_log_error(APLOG_MARK, APLOG_TRACE1, rv, server, 202 198 "requested entry not found in cache '%s:%s'.", 203 cache->prov->name, sc->cache _config);199 cache->prov->name, sc->cache->config); 204 200 else 205 201 ap_log_error(APLOG_MARK, APLOG_WARNING, rv, server, 206 202 "error fetching from cache '%s:%s'", 207 cache->prov->name, sc->cache _config);203 cache->prov->name, sc->cache->config); 208 204 /* free unused buffer */ 209 205 gnutls_free(data.data); … … 213 209 else 214 210 { 215 // TODO: clean up sc->cache_config reference216 211 ap_log_error(APLOG_MARK, APLOG_TRACE1, rv, server, 217 212 "fetched %u bytes from cache '%s:%s'", 218 data.size, cache->prov->name, sc->cache _config);213 data.size, cache->prov->name, sc->cache->config); 219 214 } 220 215 apr_pool_destroy(spool); … … 287 282 ctxt->c->base_server, 288 283 "error deleting from cache '%s:%s'", 289 ctxt->sc->cache->prov->name, ctxt->sc->cache _config);284 ctxt->sc->cache->prov->name, ctxt->sc->cache->config); 290 285 return -1; 291 286 } … … 302 297 ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, s, 303 298 "Cleaning up socache '%s:%s'", 304 sc->cache->prov->name, sc->cache _config);299 sc->cache->prov->name, sc->cache->config); 305 300 sc->cache->prov->destroy(sc->cache->socache, s); 306 301 return APR_SUCCESS; … … 342 337 if (sc->cache->prov) 343 338 { 344 /* Cache found; create it, passing anything beyond the colon. */ 339 /* Create and configure the cache instance. */ 340 sc->cache->config = sc->cache_config; 345 341 const char *err = sc->cache->prov->create(&sc->cache->socache, 346 sc->cache _config,342 sc->cache->config, 347 343 ptemp, pconf); 348 344 if (err != NULL) … … 350 346 ap_log_error(APLOG_MARK, APLOG_EMERG, APR_EGENERAL, s, 351 347 "Creating cache '%s:%s' failed: %s", 352 sc->cache_type, sc->cache _config, err);348 sc->cache_type, sc->cache->config, err); 353 349 return HTTP_INSUFFICIENT_STORAGE; 354 350 } … … 363 359 ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, 364 360 "Initializing cache '%s:%s' failed!", 365 sc->cache_type, sc->cache _config);361 sc->cache_type, sc->cache->config); 366 362 return HTTP_INSUFFICIENT_STORAGE; 367 363 } 368 364 ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, s, 369 365 "%s: socache '%s:%s' created.", __func__, 370 sc->cache_type, sc->cache _config);366 sc->cache_type, sc->cache->config); 371 367 } 372 368 else -
src/gnutls_cache.h
rb94aee2 ra314ec9 124 124 /** The actual socache instance */ 125 125 ap_socache_instance_t *socache; 126 /** Cache configuration string (as passed to the socache create 127 * function, for logging) */ 128 const char *config; 126 129 /** Mutex for cache access (used only if the cache type is not 127 130 * thread-safe) */
Note: See TracChangeset
for help on using the changeset viewer.