]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stats admin: "Unexpected result" was displayed unconditionally
authorCyril Bonté <cyril.bonte@free.fr>
Thu, 10 May 2012 17:42:52 +0000 (19:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 10 May 2012 19:51:17 +0000 (21:51 +0200)
I introduced a regression in commit 19979e176e while reworking the admin
actions results.
"Unexpected result" was displayed even if the action was applied due to a
misplaced initialization. This small patch should fix it.

Note: no need to backport.

src/proto_http.c

index 3db7de1facd30e736183f4848504930847ea2ab9..39a1fd6a13166a635ea8aa064593b8a203fe98f9 100644 (file)
@@ -7150,13 +7150,13 @@ int stats_check_uri(struct stream_interface *si, struct http_txn *txn, struct pr
                if (memcmp(h, ";st=", 4) == 0) {
                        int i;
                        h += 4;
+                       si->applet.ctx.stats.st_code = STAT_STATUS_UNKN;
                        for (i = STAT_STATUS_INIT + 1; i < STAT_STATUS_SIZE; i++) {
                                if (strncmp(stat_status_codes[i], h, 4) == 0) {
                                        si->applet.ctx.stats.st_code = i;
                                        break;
                                }
                        }
-                       si->applet.ctx.stats.st_code = STAT_STATUS_UNKN;
                        break;
                }
                h++;