From: Graham Leggett Date: Sun, 28 Feb 2010 13:25:53 +0000 (+0000) Subject: Backport r808723, which was applied to trunk but not added to the backport X-Git-Tag: 2.2.15~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ceb36495430f8091aedc07b1e5470d83a7f5b17;p=thirdparty%2Fapache%2Fhttpd.git Backport r808723, which was applied to trunk but not added to the backport proposal below. Fixes a compiler warning on v2.2 reported by Rainer Jung. mod_cache: Introduce the thundering herd lock, a mechanism to keep the flood of requests at bay that strike a backend webserver as a cached entity goes stale. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@917177 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/cache/cache_util.c b/modules/cache/cache_util.c index 41eab93a225..cb3d56537d6 100644 --- a/modules/cache/cache_util.c +++ b/modules/cache/cache_util.c @@ -249,8 +249,8 @@ CACHE_DECLARE(apr_status_t) ap_cache_try_lock(cache_server_conf *conf, lockname); return status; } - if (APR_SUCCESS == status && ((now - finfo.mtime) > conf->lockmaxage) - || (now < finfo.mtime)) { + if ((status == APR_SUCCESS) && (((now - finfo.mtime) > conf->lockmaxage) + || (now < finfo.mtime))) { ap_log_error(APLOG_MARK, APLOG_INFO, status, r->server, "Cache lock file for '%s' too old, removing: %s", r->uri, lockname);