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.
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);
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) {