From: Olivier Houchard Date: Fri, 14 Sep 2018 21:21:44 +0000 (+0200) Subject: MINOR: h2/stream_interface: Reintroduce te wake() method. X-Git-Tag: v1.9-dev3~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21df6cc2f9e72a42b3d0673ffe1bb8304fdd0ac8;p=thirdparty%2Fhaproxy.git MINOR: h2/stream_interface: Reintroduce te wake() method. For the time being, reintroduce the wake methods, it may be revisited later.h --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 616038118e..d856a60a88 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -1137,7 +1137,8 @@ static void h2_wake_some_streams(struct h2c *h2c, int last, uint32_t flags) sw->wait_reason &= ~SUB_CAN_RECV; tasklet_wakeup(sw->task); h2s->recv_wait_list = NULL; - } + } else if (h2s->cs->data_cb->wake != NULL) + h2s->cs->data_cb->wake(h2s->cs); if (flags & CS_FL_ERROR && h2s->st < H2_SS_ERROR) h2s->st = H2_SS_ERROR; @@ -2483,6 +2484,14 @@ static int h2_process(struct h2c *h2c) return 0; } +static int h2_wake(struct connection *conn) +{ + struct h2c *h2c = conn->mux_ctx; + + return (h2_process(h2c)); +} + + /* Connection timeout management. The principle is that if there's no receipt * nor sending for a certain amount of time, the connection is closed. If the * MUX buffer still has lying data or is not allocatable, the connection is @@ -3756,6 +3765,7 @@ static int h2_parse_max_concurrent_streams(char **args, int section_type, struct /* The mux operations */ const struct mux_ops h2_ops = { .init = h2_init, + .wake = h2_wake, .update_poll = h2_update_poll, .snd_buf = h2_snd_buf, .rcv_buf = h2_rcv_buf, diff --git a/src/stream_interface.c b/src/stream_interface.c index 7f787c1ef4..759b5f0a76 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -83,6 +83,7 @@ struct si_ops si_applet_ops = { }; struct data_cb si_conn_cb = { + .wake = si_cs_process, .name = "STRM", };