]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
ab: Follow up to r1910871: s/bind_num/bind_rr/g
authorYann Ylavic <ylavic@apache.org>
Sat, 8 Jul 2023 10:56:58 +0000 (10:56 +0000)
committerYann Ylavic <ylavic@apache.org>
Sat, 8 Jul 2023 10:56:58 +0000 (10:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910872 13f79535-47bb-0310-9956-ffa450edef68

support/ab.c

index be87fd68ac919760327320461e4096094881b56d..318eea6d21ee9ff1b8f2bff9da0d89583ac31367 100644 (file)
@@ -361,7 +361,7 @@ struct worker {
     int requests;
     int concurrency;
     int polled;
-    int bind_num;
+    int bind_rr;         /* next address to bind (round robin) */
     int succeeded_once;  /* response header received once */
     apr_int64_t started; /* number of requests started, so no excess */
 
@@ -1613,10 +1613,10 @@ static void start_connection(struct connection * c)
     c->pollfd.client_data = c;
 
     if (bind_count) {
-        if (worker->bind_num >= bind_count) {
-            worker->bind_num = 0;
+        if (worker->bind_rr >= bind_count) {
+            worker->bind_rr = 0;
         }
-        if ((rv = apr_socket_bind(c->aprsock, bind_addrs[worker->bind_num++]))) {
+        if ((rv = apr_socket_bind(c->aprsock, bind_addrs[worker->bind_rr++]))) {
             graceful_strerror("bind", rv);
             close_connection(c);
             return;