mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
MINOR: mux-quic: implement accessor for sedesc
Implement a function <qcs_sc> to easily access to the stconn associated with a QCS. This takes care of qcs.sd which may be NULL, for example for unidirectional streams. It is expected that in the future when implementing STOP_SENDING/RESET_STREAM, stconn must be notify about the event. This accessor will allow to easily test if the stconn is instantiated or not.
This commit is contained in:
parent
321fa7733c
commit
3abeb57909
@ -221,6 +221,11 @@ void qcs_free(struct qcs *qcs)
|
||||
pool_free(pool_head_qcs, qcs);
|
||||
}
|
||||
|
||||
static forceinline struct stconn *qcs_sc(const struct qcs *qcs)
|
||||
{
|
||||
return qcs->sd ? qcs->sd->sc : NULL;
|
||||
}
|
||||
|
||||
struct buffer *qc_get_buf(struct qcs *qcs, struct buffer *bptr)
|
||||
{
|
||||
struct buffer *buf = b_alloc(bptr);
|
||||
@ -1615,7 +1620,7 @@ static int qc_wake_some_streams(struct qcc *qcc)
|
||||
node = eb64_next(node)) {
|
||||
qcs = eb64_entry(node, struct qcs, by_id);
|
||||
|
||||
if (!qcs->sd || !qcs->sd->sc)
|
||||
if (!qcs_sc(qcs))
|
||||
continue;
|
||||
|
||||
if (qcc->conn->flags & CO_FL_ERROR) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user