]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: mux-h2/trace: fix missing braces added with traces
authorWilly Tarreau <w@1wt.eu>
Fri, 30 Aug 2019 13:02:22 +0000 (15:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 30 Aug 2019 13:03:58 +0000 (15:03 +0200)
Ilya reported in issue #242 that h2c_handle_priority() was having
unreachable code...  Obviously, I missed the braces around the "if",
leaving an unconditional return.

No backport is needed.

src/mux_h2.c

index f4ab7c67143a3280e835f919f239aeeaa4f90706..a815b6b1122ee8702a8ae9d31c7fb9de863bed02 100644 (file)
@@ -2305,9 +2305,10 @@ static int h2c_handle_priority(struct h2c *h2c)
        TRACE_ENTER(H2_EV_RX_FRAME|H2_EV_RX_PRIO, h2c->conn);
 
        /* process full frame only */
-       if (b_data(&h2c->dbuf) < h2c->dfl)
+       if (b_data(&h2c->dbuf) < h2c->dfl) {
                TRACE_DEVEL("leaving on missing data", H2_EV_RX_FRAME|H2_EV_RX_PRIO, h2c->conn);
                return 0;
+       }
 
        if (h2_get_n32(&h2c->dbuf, 0) == h2c->dsi) {
                /* 7540#5.3 : can't depend on itself */