]> granicus.if.org Git - apache/commitdiff
Use worker status character defines taken
authorRainer Jung <rjung@apache.org>
Tue, 19 Jan 2016 19:44:13 +0000 (19:44 +0000)
committerRainer Jung <rjung@apache.org>
Tue, 19 Jan 2016 19:44:13 +0000 (19:44 +0000)
from mod_proxy.h instead of explicit characters.

Noted by rpluem.

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

modules/proxy/mod_proxy_balancer.c
modules/proxy/mod_proxy_hcheck.c

index 7de92984bc885c861df4e4cabb1f5ca43f3e6e9a..ffc2ef60a73eab6ff5b167586dfe5a11fb5a6e04 100644 (file)
@@ -1098,16 +1098,16 @@ static int balancer_handler(request_rec *r)
                 *wsel->s->redirect = '\0';
         }
         if ((val = apr_table_get(params, "w_status_I"))) {
-            ap_proxy_set_wstatus('I', atoi(val), wsel);
+            ap_proxy_set_wstatus(PROXY_WORKER_IGNORE_ERRORS_FLAG, atoi(val), wsel);
         }
         if ((val = apr_table_get(params, "w_status_N"))) {
-            ap_proxy_set_wstatus('N', atoi(val), wsel);
+            ap_proxy_set_wstatus(PROXY_WORKER_DRAIN_FLAG, atoi(val), wsel);
         }
         if ((val = apr_table_get(params, "w_status_D"))) {
-            ap_proxy_set_wstatus('D', atoi(val), wsel);
+            ap_proxy_set_wstatus(PROXY_WORKER_DISABLED_FLAG, atoi(val), wsel);
         }
         if ((val = apr_table_get(params, "w_status_H"))) {
-            ap_proxy_set_wstatus('H', atoi(val), wsel);
+            ap_proxy_set_wstatus(PROXY_WORKER_HOT_STANDBY_FLAG, atoi(val), wsel);
         }
         if ((val = apr_table_get(params, "w_ls"))) {
             int ival = atoi(val);
@@ -1232,7 +1232,7 @@ static int balancer_handler(request_rec *r)
                     /* sync all timestamps */
                     bsel->wupdated = bsel->s->wupdated = nworker->s->updated = apr_time_now();
                     /* by default, all new workers are disabled */
-                    ap_proxy_set_wstatus('D', 1, nworker);
+                    ap_proxy_set_wstatus(PROXY_WORKER_DISABLED_FLAG, 1, nworker);
                 }
                 if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
                     ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01203)
index 0ca32b62917914012b293c72e0999421fe6d61c3..67d018f526109d6f852e4a9854b029f16cba9dec 100644 (file)
@@ -697,7 +697,7 @@ static void hc_check(sctx_t *ctx, apr_pool_t *p, apr_time_t now,
         if (rv == APR_SUCCESS) {
             worker->s->pcount += 1;
             if (worker->s->pcount >= worker->s->passes) {
-                ap_proxy_set_wstatus('#', 0, worker);
+                ap_proxy_set_wstatus(PROXY_WORKER_HC_FAIL_FLAG, 0, worker);
                 worker->s->pcount = 0;
                 ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO()
                              "Health check ENABLING %s", worker->s->name);
@@ -709,7 +709,7 @@ static void hc_check(sctx_t *ctx, apr_pool_t *p, apr_time_t now,
             worker->s->error_time = now;
             worker->s->fcount += 1;
             if (worker->s->fcount >= worker->s->fails) {
-                ap_proxy_set_wstatus('#', 1, worker);
+                ap_proxy_set_wstatus(PROXY_WORKER_HC_FAIL_FLAG, 1, worker);
                 worker->s->fcount = 0;
                 ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO()
                              "Health check DISABLING %s", worker->s->name);