summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2007-09-05 14:22:15 +0200
committerJim Jagielski <jim@apache.org>2007-09-05 14:22:15 +0200
commitab5a5dab3b221361b7e9d90b6f47fb984ea7ca34 (patch)
tree7c676ba3a099fe0fa6d68af7e22e0c0f14898d96 /modules
parentAdd support for proxy-nokeepalive (for testings). (diff)
downloadapache2-ab5a5dab3b221361b7e9d90b6f47fb984ea7ca34.tar.xz
apache2-ab5a5dab3b221361b7e9d90b6f47fb984ea7ca34.zip
Be proactively safe. A cheap check, but helps prevents badness :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@572937 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--modules/proxy/mod_proxy.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h
index a6a8ecc30b..32e0313155 100644
--- a/modules/proxy/mod_proxy.h
+++ b/modules/proxy/mod_proxy.h
@@ -263,14 +263,16 @@ struct proxy_conn_pool {
#define PROXY_WORKER_NOT_USABLE_BITMAP ( PROXY_WORKER_IN_SHUTDOWN | \
PROXY_WORKER_DISABLED | PROXY_WORKER_STOPPED | PROXY_WORKER_IN_ERROR )
-#define PROXY_WORKER_IS_INITIALIZED(f) ( (f)->s->status & \
- PROXY_WORKER_INITIALIZED )
+/* NOTE: these check the shared status */
+#define PROXY_WORKER_IS_INITIALIZED(f) ( (f)->s && \
+ ( (f)->s->status & PROXY_WORKER_INITIALIZED ) )
-#define PROXY_WORKER_IS_STANDBY(f) ( (f)->s->status & \
- PROXY_WORKER_HOT_STANDBY )
+#define PROXY_WORKER_IS_STANDBY(f) ( (f)->s && \
+ ( (f)->s->status & PROXY_WORKER_HOT_STANDBY ) )
-#define PROXY_WORKER_IS_USABLE(f) ( !((f)->s->status & \
- (PROXY_WORKER_NOT_USABLE_BITMAP)) && PROXY_WORKER_IS_INITIALIZED(f) )
+#define PROXY_WORKER_IS_USABLE(f) ( (f)->s && \
+ ( !( (f)->s->status & PROXY_WORKER_NOT_USABLE_BITMAP) ) && \
+ PROXY_WORKER_IS_INITIALIZED(f) )
/* default worker retry timeout in seconds */
#define PROXY_WORKER_DEFAULT_RETRY 60