httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject svn commit: r620610 - /httpd/httpd/trunk/modules/cache/mod_disk_cache.c
Date Mon, 11 Feb 2008 21:07:00 GMT
Author: dirkx
Date: Mon Feb 11 13:06:58 2008
New Revision: 620610

URL: http://svn.apache.org/viewvc?rev=620610&view=rev
Log:
Incorperate feedback of Rudiger.

Modified:
    httpd/httpd/trunk/modules/cache/mod_disk_cache.c

Modified: httpd/httpd/trunk/modules/cache/mod_disk_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_disk_cache.c?rev=620610&r1=620609&r2=620610&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_disk_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_disk_cache.c Mon Feb 11 13:06:58 2008
@@ -854,13 +854,6 @@
 
             rv = mkdir_structure(conf, dobj->hdrsfile, r->pool);
 
-            if (rv != APR_SUCCESS) {
-                ap_log_error(APLOG_MARK, APLOG_WARNING, rv, r->server,
-                    "disk_cache: could not create directory path to %s",
-                    dobj->hdrsfile);
-                return rv;
-            }
-
             rv = apr_file_mktemp(&dobj->tfd, dobj->tempfile,
                                  APR_CREATE | APR_WRITE | APR_BINARY | APR_EXCL,
                                  r->pool);
@@ -893,6 +886,7 @@
                 ap_log_error(APLOG_MARK, APLOG_WARNING, rv, r->server,
                     "disk_cache: rename tempfile to varyfile failed: %s -> %s",
                     dobj->tempfile, dobj->hdrsfile);
+                    apr_file_remove(dobj->tempfile, r->pool);
                 return rv;
             }
 
@@ -988,12 +982,6 @@
     rv = apr_file_remove(dobj->hdrsfile, r->pool);
     if (rv != APR_SUCCESS) {
         rv = mkdir_structure(conf, dobj->hdrsfile, r->pool);
-        if (rv != APR_SUCCESS) {
-            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, r->server,
-                     "disk_cache: creating directories for hdrsfile %s failed",
-                     dobj->hdrsfile);
-            return rv;
-        }
     }
 
     rv = safe_file_rename(conf, dobj->tempfile, dobj->hdrsfile, r->pool);



Mime
View raw message