MINOR: mux-h2/traces: add a missing TRACE_LEAVE() in h2s_frt_handle_headers()
authorWilly Tarreau <w@1wt.eu>
Mon, 20 Feb 2023 16:05:10 +0000 (17:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 20 Feb 2023 16:22:03 +0000 (17:22 +0100)
Traces from this function would miss a TRACE_LEAVE() on the success path,
which had for consequences, 1) that it was difficult to figure where the
function was left, and 2) that we never had the allocated stream ID
clearly visible (actually the one returned by h2c_frt_stream_new() is
the right one but it's not obvious).

This can be backported to 2.7 and 2.6.

src/mux_h2.c

index 22a8199..2ba4619 100644 (file)
@@ -2767,6 +2767,7 @@ static struct h2s *h2c_frt_handle_headers(struct h2c *h2c, struct h2s *h2s)
                else
                        h2s_close(h2s);
        }
+       TRACE_LEAVE(H2_EV_RX_FRAME|H2_EV_RX_HDR, h2c->conn, h2s);
        return h2s;
 
  conn_err: