mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-08 18:57:59 +00:00
MINOR: quic: simplify qc_prep_pkts() exit path
This commit is contained in:
parent
dcf334168c
commit
ebdcb59a0f
@ -659,6 +659,7 @@ static int qc_prep_pkts(struct quic_conn *qc, struct buffer *buf,
|
|||||||
|
|
||||||
if (err == QC_BUILD_PKT_ERR_ALLOC || err == QC_BUILD_PKT_ERR_ENCRYPT)
|
if (err == QC_BUILD_PKT_ERR_ALLOC || err == QC_BUILD_PKT_ERR_ENCRYPT)
|
||||||
goto leave;
|
goto leave;
|
||||||
|
first_pkt = NULL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -693,10 +694,8 @@ static int qc_prep_pkts(struct quic_conn *qc, struct buffer *buf,
|
|||||||
BUG_ON(padding && !next_qel);
|
BUG_ON(padding && !next_qel);
|
||||||
|
|
||||||
/* Build only one datagram when an immediate close is required. */
|
/* Build only one datagram when an immediate close is required. */
|
||||||
if (cc) {
|
if (cc)
|
||||||
qc_txb_store(buf, dglen, first_pkt);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
|
||||||
|
|
||||||
/* Only one short packet by datagram when probing. */
|
/* Only one short packet by datagram when probing. */
|
||||||
if (probe && qel == qc->ael)
|
if (probe && qel == qc->ael)
|
||||||
@ -743,10 +742,10 @@ static int qc_prep_pkts(struct quic_conn *qc, struct buffer *buf,
|
|||||||
TRACE_DEVEL("next encryption level", QUIC_EV_CONN_PHPKTS, qc);
|
TRACE_DEVEL("next encryption level", QUIC_EV_CONN_PHPKTS, qc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
if (first_pkt)
|
if (first_pkt)
|
||||||
qc_txb_store(buf, wrlen, first_pkt);
|
qc_txb_store(buf, wrlen, first_pkt);
|
||||||
|
|
||||||
out:
|
|
||||||
if (cc && total) {
|
if (cc && total) {
|
||||||
BUG_ON(buf != &qc->tx.cc_buf);
|
BUG_ON(buf != &qc->tx.cc_buf);
|
||||||
BUG_ON(dglen != total);
|
BUG_ON(dglen != total);
|
||||||
|
Loading…
Reference in New Issue
Block a user