Implement qc_destroy. This callback is used to quickly release all MUX
resources.
session_free uses this callback. Currently, it can only be called if
there was an error during connection initialization. If not defined, the
process crashes.
return -1;
}
+static void qc_destroy(void *ctx)
+{
+ struct qcc *qcc = ctx;
+
+ TRACE_ENTER(QMUX_EV_QCC_END, qcc->conn);
+ qc_release(qcc);
+ TRACE_LEAVE(QMUX_EV_QCC_END);
+}
+
static void qc_detach(struct conn_stream *cs)
{
struct qcs *qcs = __cs_mux(cs);
static const struct mux_ops qc_ops = {
.init = qc_init,
+ .destroy = qc_destroy,
.detach = qc_detach,
.rcv_buf = qc_rcv_buf,
.snd_buf = qc_snd_buf,