]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h2: lookup the stream during demuxing
authorWilly Tarreau <w@1wt.eu>
Tue, 17 Oct 2017 06:18:25 +0000 (08:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:16:18 +0000 (18:16 +0100)
Several stream-oriented functions will need to perform this lookup, so
better centralize it.

src/mux_h2.c

index 8fee6bd2eac39f43f1c6a135e5923e66b5a7650a..d9f0b565f71a6867d2bea522239fc738cabf7d69 100644 (file)
@@ -955,6 +955,8 @@ static int h2c_ack_ping(struct h2c *h2c)
 /* process Rx frames to be demultiplexed */
 static void h2_process_demux(struct h2c *h2c)
 {
+       struct h2s *h2s;
+
        if (h2c->st0 >= H2_CS_ERROR)
                return;
 
@@ -1035,6 +1037,7 @@ static void h2_process_demux(struct h2c *h2c)
                }
 
                /* Only H2_CS_FRAME_P and H2_CS_FRAME_A here */
+               h2s = h2c_st_by_id(h2c, h2c->dsi);
 
                switch (h2c->dft) {
                case H2_FT_SETTINGS: