httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1725602 - in /httpd/httpd/trunk/modules/proxy: mod_proxy_balancer.c mod_proxy_hcheck.c
Date Tue, 19 Jan 2016 19:44:13 GMT
Author: rjung
Date: Tue Jan 19 19:44:13 2016
New Revision: 1725602

URL: http://svn.apache.org/viewvc?rev=1725602&view=rev
Log:
Use worker status character defines taken
from mod_proxy.h instead of explicit characters.

Noted by rpluem.

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
    httpd/httpd/trunk/modules/proxy/mod_proxy_hcheck.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c?rev=1725602&r1=1725601&r2=1725602&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c Tue Jan 19 19:44:13 2016
@@ -1098,16 +1098,16 @@ static int balancer_handler(request_rec
                 *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
                     /* 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)

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_hcheck.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_hcheck.c?rev=1725602&r1=1725601&r2=1725602&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_hcheck.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_hcheck.c Tue Jan 19 19:44:13 2016
@@ -697,7 +697,7 @@ static void hc_check(sctx_t *ctx, apr_po
         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_po
             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);



Mime
View raw message