]> granicus.if.org Git - apache/commitdiff
Fix errors with CacheLock on Windows:
authorEric Covener <covener@apache.org>
Sat, 19 Apr 2014 20:21:01 +0000 (20:21 +0000)
committerEric Covener <covener@apache.org>
Sat, 19 Apr 2014 20:21:01 +0000 (20:21 +0000)
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:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588704 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/cache/cache_util.c

diff --git a/CHANGES b/CHANGES
index 962c32c1bf34197f2ad793e3d424360ce7d976fc..95f18abad8c9679c2a270af8b06327530f493b4b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_cache: Fix AH00784 errors on Windows when the the CacheLock directive
+     is enabled.  [Eric Covener]
+
   *) mod_proxy: Preserve original request headers even if they differ
      from the ones to be forwarded to the backend. PR 45387.
      [Yann Ylavic]
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);