From 252eb962b57afa1f492679a6e14720acf6738508 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Wed, 19 Sep 2012 14:18:19 +0000 Subject: [PATCH] Log whether or not the restore from shm actually resulted in a match of shm data, or whether it was stale. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1387607 13f79535-47bb-0310-9956-ffa450edef68 --- docs/log-message-tags/next-number | 2 +- modules/proxy/proxy_util.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number index fd75012648..978e2eca86 100644 --- a/docs/log-message-tags/next-number +++ b/docs/log-message-tags/next-number @@ -1 +1 @@ -2337 +2339 diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 48e60da4a2..ce81b19e3b 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1199,6 +1199,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_share_balancer(proxy_balancer *balancer, { apr_status_t rv = APR_SUCCESS; proxy_balancer_method *lbmethod; + char *ptr = ""; if (!shm || !balancer->s) return APR_EINVAL; @@ -1207,7 +1208,11 @@ PROXY_DECLARE(apr_status_t) ap_proxy_share_balancer(proxy_balancer *balancer, memcpy(shm, balancer->s, sizeof(proxy_balancer_shared)); if (balancer->s->was_malloced) free(balancer->s); + } else { + ptr = "not "; } + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02337) + "%scopying shm for %s", ptr, balancer->s->name); balancer->s = shm; balancer->s->index = i; /* the below should always succeed */ @@ -1641,6 +1646,7 @@ PROXY_DECLARE(char *) ap_proxy_define_worker(apr_pool_t *p, PROXY_DECLARE(apr_status_t) ap_proxy_share_worker(proxy_worker *worker, proxy_worker_shared *shm, int i) { + char *ptr = ""; if (!shm || !worker->s) return APR_EINVAL; @@ -1649,7 +1655,11 @@ PROXY_DECLARE(apr_status_t) ap_proxy_share_worker(proxy_worker *worker, proxy_wo memcpy(shm, worker->s, sizeof(proxy_worker_shared)); if (worker->s->was_malloced) free(worker->s); /* was malloced in ap_proxy_define_worker */ + } else { + ptr = "not "; } + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02338) + "%scopying shm for worker: %s", ptr, worker->s->name); worker->s = shm; worker->s->index = i; -- 2.40.0