return ret;
}
+/* Free <qcc> STREAM frames in Tx list. */
+static void qcc_clear_frms(struct qcc *qcc)
+{
+ TRACE_STATE("resetting STREAM frames list", QMUX_EV_QCC_SEND, qcc->conn);
+ while (!LIST_ISEMPTY(&qcc->tx.frms)) {
+ struct quic_frame *frm = LIST_ELEM(qcc->tx.frms.n, struct quic_frame *, list);
+ qc_frm_free(conn_is_quic(qcc->conn) ? qcc->conn->handle.qc : NULL, &frm);
+ }
+}
+
/* Allocate if needed and retrieve <qcs> stream buffer for data reception.
*
* Returns buffer pointer. May be NULL on allocation failure.
{
if (qcs_prep_bytes(qcs) == b_data(out)) {
b_slow_realign(out, trash.area, b_data(out));
+ /* TODO only the QCS owned STREAM frame should be removed,
+ * however for now there is no mechanism to retry emission
+ * without clearing the whole list.
+ */
+ qcc_clear_frms(qcs->qcc);
return 0;
}
}
}
-/* Free <qcc> STREAM frames in Tx list. */
-static void qcc_clear_frms(struct qcc *qcc)
-{
- TRACE_STATE("resetting STREAM frames list", QMUX_EV_QCC_SEND, qcc->conn);
- while (!LIST_ISEMPTY(&qcc->tx.frms)) {
- struct quic_frame *frm = LIST_ELEM(qcc->tx.frms.n, struct quic_frame *, list);
- qc_frm_free(conn_is_quic(qcc->conn) ? qcc->conn->handle.qc : NULL, &frm);
- }
-}
-
/* Register <qcs> stream for emission of STREAM, STOP_SENDING or RESET_STREAM.
* Set <urg> to true if stream should be emitted in priority. This is useful
* when sending STOP_SENDING or RESET_STREAM, or for emission on an application