]> granicus.if.org Git - apache/commitdiff
Merge r1588704 from trunk:
authorJim Jagielski <jim@apache.org>
Wed, 7 May 2014 12:51:18 +0000 (12:51 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 7 May 2014 12:51:18 +0000 (12:51 +0000)
Fix errors with CacheLock on Windows:

cache_util.c(757): (OS 80)The file exists.  : [client 127.0.0.1:63889]
AH00784: Attempt to obtain a cache lock for stale cached URL failed,
revalidating entry anyway:

Submitted by: covener
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1593000 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/cache/cache_util.c

diff --git a/CHANGES b/CHANGES
index b300af53b5ce6d4b82ebe430b80c36e5fc15296d..0e88a502b7b7769a52096ce0faa719e2e7f7809e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.10
 
+  *) mod_cache: Fix AH00784 errors on Windows when the the CacheLock directive
+     is enabled.  [Eric Covener]
+
   *) mod_expires: don't add Expires header to error responses (4xx/5xx),
      be they generated or forwarded. PR 55669. [ Yann Ylavic ]
 
diff --git a/STATUS b/STATUS
index 8038c4b0398f0ad7478f59d48521be2f1e7406d1..aca381f59c5b95f9634268e2e0598d75d33da2b8 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -100,11 +100,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_cache: Fix CacheLock on Windows
-     trunk patch: http://svn.apache.org/r1588704
-     2.4.x patch: trunk works
-     +1 covener, trawick, jim
-
    * mod_ssl: set the current cert in ssl_callback_TmpDH before calling
      SSL_get_privatekey(ssl)
      trunk patch: https://svn.apache.org/r1588851
index 7b7fb45c23af1fb48dd9b2774e9e04c32343b186..cafbc167816117170a0d9e7811d48b3ff855e1c8 100644 (file)
@@ -240,7 +240,7 @@ CACHE_DECLARE(apr_int64_t) ap_cache_current_age(cache_info *info,
  * Try obtain a cache wide lock on the given cache key.
  *
  * If we return APR_SUCCESS, we obtained the lock, and we are clear to
- * proceed to the backend. If we return APR_EEXISTS, then the lock is
+ * proceed to the backend. If we return APR_EEXIST, then the lock is
  * already locked, someone else has gone to refresh the backend data
  * already, so we must return stale data with a warning in the mean
  * time. If we return anything else, then something has gone pear
@@ -735,9 +735,9 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
                 r->unparsed_uri);
         return 0;
     }
-    else if (APR_EEXIST == status) {
+    else if (APR_STATUS_IS_EEXIST(status)) {
         /* lock already exists, return stale data anyway, with a warning */
-        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00783)
+        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00783)
                 "Cache already locked for stale cached URL, "
                 "pretend it is fresh: %s",
                 r->unparsed_uri);