MEDIUM: mux-quic: wake up xprt on data transferred

On qc_send, data are transferred for each stream from their qcs.buf to
the qcs.xprt_buf. Wake up the xprt to warn about new data available for
transmission.
This commit is contained in:
Amaury Denoyelle 2021-12-03 14:39:29 +01:00
parent a2c58a7c8d
commit e257d9e8ec

View File

@ -164,6 +164,7 @@ static int qcs_push_frame(struct qcs *qcs, struct buffer *payload, int fin, uint
static int qc_send(struct qcc *qcc)
{
struct eb64_node *node;
int xprt_wake = 0;
int ret;
fprintf(stderr, "%s\n", __func__);
@ -190,10 +191,10 @@ static int qc_send(struct qcc *qcc)
if (ret < 0)
ABORT_NOW();
if (ret > 0)
if (ret > 0) {
qcs_notify_send(qcs);
/* TODO wake-up xprt if data were transfered */
xprt_wake = 1;
}
fprintf(stderr, "%s ret=%d\n", __func__, ret);
qcs->tx.offset += ret;
@ -206,6 +207,9 @@ static int qc_send(struct qcc *qcc)
node = eb64_next(node);
}
if (xprt_wake)
tasklet_wakeup(((struct ssl_sock_ctx *)(qcc->conn->xprt_ctx))->wait_event.tasklet);
return ret;
}