httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1420827 - in /httpd/httpd/branches/2.4.x: ./ STATUS docs/manual/ docs/manual/mod/ modules/cache/mod_cache_disk.c
Date Wed, 12 Dec 2012 16:52:37 GMT
Author: jim
Date: Wed Dec 12 16:52:34 2012
New Revision: 1420827

URL: http://svn.apache.org/viewvc?rev=1420827&view=rev
Log:
Merge r1405856 from trunk:

* fd is no member of disk_cache_object_t. Instead it is a member of
  disk_cache_file_t. Close all fd's (fd, tempfd) for all cache elements
  (hdrs, data, vary) if they are present.

Submitted by: rpluem
Reviewed/backported by: jim

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/docs/manual/   (props changed)
    httpd/httpd/branches/2.4.x/docs/manual/mod/   (props changed)
    httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1405856

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1420827&r1=1420826&r2=1420827&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Wed Dec 12 16:52:34 2012
@@ -91,11 +91,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_cache_disk: Fix "...rename tempfile to datafile failed...") on Windows.
-                     PR38827.
-     trunk patch: http://svn.apache.org/viewvc?rev=1405856&view=rev
-     2.4.x patch: http://people.apache.org/~covener/patches/httpd-2.4.x-disk-cache-win.diff
-     +1 covener, rjung, jim
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:

Propchange: httpd/httpd/branches/2.4.x/docs/manual/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs/manual:r1405856

Propchange: httpd/httpd/branches/2.4.x/docs/manual/mod/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs/manual/mod:r1405856

Modified: httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c?rev=1420827&r1=1420826&r2=1420827&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c (original)
+++ httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c Wed Dec 12 16:52:34 2012
@@ -594,8 +594,26 @@ static int open_entity(cache_handle_t *h
     return DECLINED;
 }
 
+static void close_disk_cache_fd(disk_cache_file_t *file)
+{
+   if (file->fd != NULL) {
+       apr_file_close(file->fd);
+       file->fd = NULL;
+   }
+   if (file->tempfd != NULL) {
+       apr_file_close(file->tempfd);
+       file->tempfd = NULL;
+   }
+}
+
 static int remove_entity(cache_handle_t *h)
 {
+    disk_cache_object_t *dobj = (disk_cache_object_t *) h->cache_obj->vobj;
+
+    close_disk_cache_fd(&(dobj->hdrs));
+    close_disk_cache_fd(&(dobj->vary));
+    close_disk_cache_fd(&(dobj->data));
+
     /* Null out the cache object pointer so next time we start from scratch  */
     h->cache_obj = NULL;
     return OK;



Mime
View raw message