void qc_check_close_on_released_mux(struct quic_conn *qc);
-void quic_conn_release(struct quic_conn *qc);
+int quic_conn_release(struct quic_conn *qc);
void qc_kill_conn(struct quic_conn *qc);
out:
if ((qc->flags & QUIC_FL_CONN_CLOSING) && qc->mux_state != QC_MUX_READY) {
- quic_conn_release(qc);
- t = NULL;
+ if (quic_conn_release(qc))
+ t = NULL;
qc = NULL;
}
}
if ((qc->flags & QUIC_FL_CONN_CLOSING) && qc->mux_state != QC_MUX_READY) {
- quic_conn_release(qc);
+ if (quic_conn_release(qc))
+ t = NULL;
qc = NULL;
}
*
* This function must only be called by the thread responsible of the quic_conn
* tasklet.
+ *
+ * Returns 1 if the tasklet was released, 0 otherwise
*/
-void quic_conn_release(struct quic_conn *qc)
+int quic_conn_release(struct quic_conn *qc)
{
struct eb64_node *node;
struct quic_rx_packet *pkt, *pktback;
struct quic_conn_closed *cc_qc;
+ int ret = 0;
TRACE_ENTER(QUIC_EV_CONN_CLOSE, qc);
qc->cids = NULL;
pool_free(pool_head_quic_cc_buf, qc->tx.cc_buf_area);
qc->tx.cc_buf_area = NULL;
+ ret = 1;
}
if (qc_test_fd(qc))
TRACE_PROTO("QUIC conn. freed", QUIC_EV_CONN_FREED, qc);
leave:
TRACE_LEAVE(QUIC_EV_CONN_CLOSE, qc);
+ return ret;
}
/* Initialize the timer task of <qc> QUIC connection.