mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
MINOR: quic: simplify qc_send_hdshk_pkts() return
Clean up trailer of qc_send_hdshk_pkts() by removing label "leave". Only "out" label is now used. This operation is safe as LIST_DEL_INIT() is idempotent. Caller of qc_send_hdshk_pkts() also ensures input frame lists are freed, so it's better to always reset quic_enc_level <retrans_frms> member. Also take the opportunity to reset QUIC_FL_CONN_RETRANS_OLD_DATA only if already set. This is considered more robust and will also remove unneeded trace occurences. No functional change. The main objective of this commit is to clean up code in preparation of a refactoring on send functions.
This commit is contained in:
parent
9420cfc0db
commit
44eec848e8
@ -911,7 +911,7 @@ int qc_send_hdshk_pkts(struct quic_conn *qc, int old_data,
|
||||
|
||||
if (!buf) {
|
||||
TRACE_ERROR("buffer allocation failed", QUIC_EV_CONN_TXPKT, qc);
|
||||
goto leave;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (b_data(buf) && !qc_purge_txbuf(qc, buf)) {
|
||||
@ -969,10 +969,12 @@ int qc_send_hdshk_pkts(struct quic_conn *qc, int old_data,
|
||||
qel2->retrans_frms = NULL;
|
||||
}
|
||||
|
||||
if (old_data) {
|
||||
TRACE_STATE("no more need old data for probing", QUIC_EV_CONN_TXPKT, qc);
|
||||
qc->flags &= ~QUIC_FL_CONN_RETRANS_OLD_DATA;
|
||||
leave:
|
||||
TRACE_LEAVE(QUIC_EV_CONN_TXPKT, qc);
|
||||
}
|
||||
|
||||
TRACE_DEVEL((status ? "leaving" : "leaving in error"), QUIC_EV_CONN_TXPKT, qc);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user