From: Rainer Jung Date: Tue, 19 Jan 2016 19:44:13 +0000 (+0000) Subject: Use worker status character defines taken X-Git-Tag: 2.5.0-alpha~2354 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7cc83fe9abdabc41b3d389280f2455fc9ce7ae25;p=apache Use worker status character defines taken 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 --- diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index 7de92984bc..ffc2ef60a7 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -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) diff --git a/modules/proxy/mod_proxy_hcheck.c b/modules/proxy/mod_proxy_hcheck.c index 0ca32b6291..67d018f526 100644 --- a/modules/proxy/mod_proxy_hcheck.c +++ b/modules/proxy/mod_proxy_hcheck.c @@ -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);