mirror of
https://github.com/apache/httpd.git
synced 2026-01-06 09:01:14 +03:00
mod_cache_disk: Only attempt to commit to the initialisation if the attempt
to open the cache file was successful. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1078083 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
13
modules/cache/mod_cache_disk.c
vendored
13
modules/cache/mod_cache_disk.c
vendored
@@ -432,8 +432,8 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
|
||||
}
|
||||
|
||||
/* Create and init the cache object */
|
||||
h->cache_obj = obj = apr_pcalloc(r->pool, sizeof(cache_object_t));
|
||||
obj->vobj = dobj = apr_pcalloc(r->pool, sizeof(disk_cache_object_t));
|
||||
obj = apr_pcalloc(r->pool, sizeof(cache_object_t));
|
||||
dobj = apr_pcalloc(r->pool, sizeof(disk_cache_object_t));
|
||||
|
||||
info = &(obj->info);
|
||||
|
||||
@@ -570,11 +570,20 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
|
||||
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
|
||||
"cache_disk: Recalled cached URL info header %s", dobj->name);
|
||||
|
||||
/* make the configuration stick */
|
||||
h->cache_obj = obj;
|
||||
obj->vobj = dobj;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
/* make the configuration stick */
|
||||
h->cache_obj = obj;
|
||||
obj->vobj = dobj;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user