]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG: stats: fix regression introduced by commit 4348fad1
authorWilly Tarreau <w@1wt.eu>
Wed, 26 Sep 2012 19:03:11 +0000 (21:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 26 Sep 2012 19:03:11 +0000 (21:03 +0200)
Recent commit 4348fad1 (listeners: use dual-linked lists to chain listeners
with frontends) broke frontend lookup in stats sockets by using the wrong
iterator in the listeners.

src/dumpstats.c

index 37dfcbc7dcac5bc999464903e02445466c4d99cd..7c01e79bc08627c694a6b7d4df0d878c27d70aa6 100644 (file)
@@ -944,7 +944,7 @@ static int stats_sock_parse_request(struct stream_interface *si, char *line)
                                                sv->counters.sps_max = 0;
                                        }
 
-                               list_for_each_entry(li, &px->conf.listeners, by_bind)
+                               list_for_each_entry(li, &px->conf.listeners, by_fe)
                                        if (li->counters) {
                                                if (clrall)
                                                        memset(li->counters, 0, sizeof(*li->counters));
@@ -1124,7 +1124,7 @@ static int stats_sock_parse_request(struct stream_interface *si, char *line)
                                 * its listeners. The blocked ones will be dequeued.
                                 */
                                px->maxconn = v;
-                               list_for_each_entry(l, &px->conf.listeners, by_bind) {
+                               list_for_each_entry(l, &px->conf.listeners, by_fe) {
                                        l->maxconn = v;
                                        if (l->state == LI_FULL)
                                                resume_listener(l);