MINOR: mux-quic: prepare traces support for QMux

Ensure mux-quic traces will be compatible with the new QMux protocol.
This is necessary as the quic_conn element is accessed to display some
transport information. Use conn_is_quic() to protect these accesses.
This commit is contained in:
Amaury Denoyelle 2026-03-26 15:03:04 +01:00
parent afa17f68a9
commit ce4aab4fdb

View File

@ -143,18 +143,19 @@ static char *qcc_app_st_to_str(const enum qcc_app_st st)
void qmux_dump_qcc_info(struct buffer *msg, const struct qcc *qcc)
{
const struct quic_conn *qc = qcc->conn->handle.qc;
const struct quic_conn *qc = conn_is_quic(qcc->conn) ? qcc->conn->handle.qc : NULL;
chunk_appendf(msg, " qcc=%p(%c)", qcc, (qcc->flags & QC_CF_IS_BACK) ? 'B' : 'F');
if (qcc->conn->handle.qc)
if (qc)
chunk_appendf(msg, " qc=%p", qcc->conn->handle.qc);
chunk_appendf(msg, " .st=%s .sc=%llu .hreq=%llu .flg=0x%04x",
qcc_app_st_to_str(qcc->app_st), (ullong)qcc->nb_sc,
(ullong)qcc->nb_hreq, qcc->flags);
chunk_appendf(msg, " .tx=%llu %llu/%llu bwnd=%llu/%llu",
(ullong)qcc->tx.fc.off_soft, (ullong)qcc->tx.fc.off_real, (ullong)qcc->tx.fc.limit,
(ullong)qcc->tx.buf_in_flight, (ullong)qc->path->cwnd);
chunk_appendf(msg, " .tx=%llu %llu/%llu",
(ullong)qcc->tx.fc.off_soft, (ullong)qcc->tx.fc.off_real, (ullong)qcc->tx.fc.limit);
if (qc)
chunk_appendf(msg, " bwnd=%llu/%llu", (ullong)qcc->tx.buf_in_flight, (ullong)qc->path->cwnd);
}
void qmux_dump_qcs_info(struct buffer *msg, const struct qcs *qcs)