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 7fc3131..7d55714 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -1068,10 +1068,6 @@
}
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 @@
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 @@
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 @@
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);