]> granicus.if.org Git - apache/commitdiff
Merge r1725445 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 4 Feb 2016 19:26:00 +0000 (19:26 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 4 Feb 2016 19:26:00 +0000 (19:26 +0000)
No need to search twice for the same value.
Submitted by: jailletc36
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1728541 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/proxy/balancers/mod_lbmethod_heartbeat.c

diff --git a/STATUS b/STATUS
index a556e08718b38ba9556ee139662fd326442de4dd..62086adc82f3a8fd39babe1596530b00d586c0bb 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -113,11 +113,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
 
-  *) mod_lbmethod_heartbeat: No need to search twice for the same value
-     trunk patch:  http://svn.apache.org/r1725445
-     2.4.x patch:  trunk works
-     +1: jailletc36, icing, jim
-
   *) mod_ssl: Fix some duplicate definitions
      trunk patch:  http://svn.apache.org/r1726888
      2.4.x patch:  trunk works
index 0a4d961ebb73fe52f84155cd7a77cddccfb583ed..863fc029e8a0a97480c970b9ea75e0bb039117b1 100644 (file)
@@ -127,7 +127,7 @@ static apr_status_t readfile_heartbeats(const char *path, apr_hash_t *servers,
             hb_server_t *server;
             char buf[4096];
             apr_size_t bsize = sizeof(buf);
-            const char *ip;
+            const char *ip, *val;
 
             apr_brigade_cleanup(tmpbb);
 
@@ -180,20 +180,20 @@ static apr_status_t readfile_heartbeats(const char *path, apr_hash_t *servers,
 
             argstr_to_table(pool, apr_pstrdup(pool, t), hbt);
 
-            if (apr_table_get(hbt, "busy")) {
-                server->busy = atoi(apr_table_get(hbt, "busy"));
+            if ((val = apr_table_get(hbt, "busy"))) {
+                server->busy = atoi(val);
             }
 
-            if (apr_table_get(hbt, "ready")) {
-                server->ready = atoi(apr_table_get(hbt, "ready"));
+            if ((val = apr_table_get(hbt, "ready"))) {
+                server->ready = atoi(val);
             }
 
-            if (apr_table_get(hbt, "lastseen")) {
-                server->seen = atoi(apr_table_get(hbt, "lastseen"));
+            if ((val = apr_table_get(hbt, "lastseen"))) {
+                server->seen = atoi(val);
             }
 
-            if (apr_table_get(hbt, "port")) {
-                server->port = atoi(apr_table_get(hbt, "port"));
+            if ((val = apr_table_get(hbt, "port"))) {
+                server->port = atoi(val);
             }
 
             if (server->busy == 0 && server->ready != 0) {