MINOR: mux-quic: define release app-ops

Define a new callback release inside qcc_app_ops. It is called when the
qcc MUX is freed via qc_release. This will allows to implement cleaning
on the app layer.
This commit is contained in:
Amaury Denoyelle 2022-03-29 14:46:38 +02:00
parent dccbd733f0
commit cbc13b71c6
2 changed files with 4 additions and 0 deletions

View File

@ -118,6 +118,7 @@ struct qcc_app_ops {
int (*decode_qcs)(struct qcs *qcs, int fin, void *ctx);
size_t (*snd_buf)(struct conn_stream *cs, struct buffer *buf, size_t count, int flags);
int (*finalize)(void *ctx);
void (*release)(void *ctx);
};
#endif /* USE_QUIC */

View File

@ -481,6 +481,9 @@ static void qc_release(struct qcc *qcc)
TRACE_DEVEL("freeing qcc", QMUX_EV_QCC_END, conn);
if (qcc->app_ops && qcc->app_ops->release)
qcc->app_ops->release(qcc->ctx);
if (qcc->wait_event.tasklet)
tasklet_free(qcc->wait_event.tasklet);