]> granicus.if.org Git - apache/commitdiff
Fix remaining lint from ms capability for hchecks.
authorJim Jagielski <jim@apache.org>
Wed, 16 Aug 2017 15:14:48 +0000 (15:14 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 16 Aug 2017 15:14:48 +0000 (15:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1805206 13f79535-47bb-0310-9956-ffa450edef68

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

index b8cf195594b803f4d3179fceffa3747df8facff9..bdefc8f54e3cb3c88c413d914b826592e7a831e7 100644 (file)
@@ -1096,7 +1096,7 @@ static int balancer_handler(request_rec *r)
             int ival;
             double fval = atof(val);
             ival = fval * 100.0;
-            if (ival >= 1 && ival <= 100) {
+            if (ival >= 100 && ival <= 10000) {
                 wsel->s->lbfactor = ival;
                 if (bsel)
                     recalc_factors(bsel);
@@ -1617,7 +1617,7 @@ static int balancer_handler(request_rec *r)
                 ap_rputs(apr_strfsize(worker->s->read, fbuf), r);
                 if (set_worker_hc_param_f) {
                     ap_rprintf(r, "</td><td>%s</td>", ap_proxy_show_hcmethod(worker->s->method));
-                    ap_rprintf(r, "<td>%dms</td>", (int)apr_time_msec(worker->s->interval));
+                    ap_rprintf(r, "<td>%" APR_TIME_T_FMT "ms</td>", apr_time_as_msec(worker->s->interval));
                     ap_rprintf(r, "<td>%d (%d)</td>", worker->s->passes,worker->s->pcount);
                     ap_rprintf(r, "<td>%d (%d)</td>", worker->s->fails, worker->s->fcount);
                     ap_rprintf(r, "<td>%s</td>", worker->s->hcuri);
@@ -1687,7 +1687,7 @@ static int balancer_handler(request_rec *r)
                 hc_select_exprs_f(r, wsel->s->hcexpr);
                 ap_rputs("</select>\n</td></tr>\n", r);
                 ap_rprintf(r, "<tr><td>Interval (ms)</td><td><input name='w_hi' id='w_hi' type='text'"
-                           "value='%d'></td></tr>\n", (int)apr_time_msec(wsel->s->interval));
+                           "value='%" APR_TIME_T_FMT "'></td></tr>\n", apr_time_as_msec(wsel->s->interval));
                 ap_rprintf(r, "<tr><td>Passes trigger</td><td><input name='w_hp' id='w_hp' type='text'"
                            "value='%d'></td></tr>\n", wsel->s->passes);
                 ap_rprintf(r, "<tr><td>Fails trigger)</td><td><input name='w_hf' id='w_hf' type='text'"
index 279c3ac526957244983bcaa14ad5df3fd9b00a9f..1b2833bf10bebd67aa6e557c4a5aee8e09892fb8 100644 (file)
@@ -1026,7 +1026,7 @@ static int hc_post_config(apr_pool_t *p, apr_pool_t *plog,
             continue;
         }
         rv = hc_watchdog_register_callback(watchdog,
-                apr_time_from_sec(AP_WD_TM_SLICE),
+                AP_WD_TM_SLICE,
                 ctx,
                 hc_watchdog_callback);
         if (rv) {