From: Willy Tarreau Date: Mon, 26 Feb 2018 19:11:24 +0000 (+0100) Subject: MEDIUM: h2: don't call data_cb->recv() anymore X-Git-Tag: v1.9-dev1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2df65e7194c78b2b35939db580dffc2b225f6be0;p=thirdparty%2Fhaproxy.git MEDIUM: h2: don't call data_cb->recv() anymore Now we simply call data_cb->wake() which will automatically perform the recv() call if required. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 7fc31312a2..7d55714cdb 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -1068,10 +1068,6 @@ static void h2_wake_some_streams(struct h2c *h2c, int last, uint32_t flags) } h2s->cs->flags |= flags; - /* recv is used to force to detect CS_FL_EOS that wake() - * doesn't handle in the stream int code. - */ - h2s->cs->data_cb->recv(h2s->cs); h2s->cs->data_cb->wake(h2s->cs); if (flags & CS_FL_ERROR && h2s->st < H2_SS_ERROR) @@ -1550,10 +1546,6 @@ static int h2c_handle_rst_stream(struct h2c *h2c, struct h2s *h2s) if (h2s->cs) { h2s->cs->flags |= CS_FL_EOS | CS_FL_ERROR; - /* recv is used to force to detect CS_FL_EOS that wake() - * doesn't handle in the stream-int code. - */ - h2s->cs->data_cb->recv(h2s->cs); h2s->cs->data_cb->wake(h2s->cs); } @@ -1819,7 +1811,6 @@ static void h2_process_demux(struct h2c *h2c) if (tmp_h2s != h2s && h2s && h2s->cs && b_data(&h2s->cs->rxbuf)) { /* we may have to signal the upper layers */ h2s->cs->flags |= CS_FL_RCV_MORE; - h2s->cs->data_cb->recv(h2s->cs); if (h2s->cs->data_cb->wake(h2s->cs) < 0) { /* cs has just been destroyed, we have to kill h2s. */ h2s_error(h2s, H2_ERR_STREAM_CLOSED); @@ -2057,7 +2048,6 @@ static void h2_process_demux(struct h2c *h2c) if (h2s && h2s->cs && b_data(&h2s->cs->rxbuf)) { /* we may have to signal the upper layers */ h2s->cs->flags |= CS_FL_RCV_MORE; - h2s->cs->data_cb->recv(h2s->cs); if (h2s->cs->data_cb->wake(h2s->cs) < 0) { /* cs has just been destroyed, we have to kill h2s. */ h2s_error(h2s, H2_ERR_STREAM_CLOSED);