diff --git a/include/haproxy/mux_quic-t.h b/include/haproxy/mux_quic-t.h index 80fa683257..fa83a19ff3 100644 --- a/include/haproxy/mux_quic-t.h +++ b/include/haproxy/mux_quic-t.h @@ -104,7 +104,7 @@ struct qcc { struct qcs { struct qcc *qcc; - struct sedesc *endp; + struct sedesc *sd; uint32_t flags; /* QC_SF_* */ void *ctx; /* app-ops context */ diff --git a/include/haproxy/mux_quic.h b/include/haproxy/mux_quic.h index 9c89c184f7..3c713a3a6d 100644 --- a/include/haproxy/mux_quic.h +++ b/include/haproxy/mux_quic.h @@ -96,18 +96,18 @@ static inline struct stconn *qc_attach_sc(struct qcs *qcs, struct buffer *buf) struct qcc *qcc = qcs->qcc; struct session *sess = qcc->conn->owner; - qcs->endp = sedesc_new(); - if (!qcs->endp) + qcs->sd = sedesc_new(); + if (!qcs->sd) return NULL; - qcs->endp->se = qcs; - qcs->endp->conn = qcc->conn; - se_fl_set(qcs->endp, SE_FL_T_MUX | SE_FL_ORPHAN | SE_FL_NOT_FIRST); + qcs->sd->se = qcs; + qcs->sd->conn = qcc->conn; + se_fl_set(qcs->sd, SE_FL_T_MUX | SE_FL_ORPHAN | SE_FL_NOT_FIRST); /* TODO duplicated from mux_h2 */ sess->t_idle = tv_ms_elapsed(&sess->tv_accept, &now) - sess->t_handshake; - if (!sc_new_from_endp(qcs->endp, sess, buf)) + if (!sc_new_from_endp(qcs->sd, sess, buf)) return NULL; ++qcc->nb_sc; @@ -118,7 +118,7 @@ static inline struct stconn *qc_attach_sc(struct qcs *qcs, struct buffer *buf) sess->t_handshake = 0; sess->t_idle = 0; - return qcs->endp->sc; + return qcs->sd->sc; } #endif /* USE_QUIC */ diff --git a/src/mux_quic.c b/src/mux_quic.c index b1cd313cc3..a904c97f78 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -124,7 +124,7 @@ struct qcs *qcs_new(struct qcc *qcc, uint64_t id, enum qcs_type type) qcs->stream = NULL; qcs->qcc = qcc; - qcs->endp = NULL; + qcs->sd = NULL; qcs->flags = QC_SF_NONE; qcs->ctx = NULL; @@ -213,8 +213,8 @@ void qcs_free(struct qcs *qcs) qc_stream_desc_release(qcs->stream); - BUG_ON(qcs->endp && !se_fl_test(qcs->endp, SE_FL_ORPHAN)); - sedesc_free(qcs->endp); + BUG_ON(qcs->sd && !se_fl_test(qcs->sd, SE_FL_ORPHAN)); + sedesc_free(qcs->sd); eb64_delete(&qcs->by_id); pool_free(pool_head_qcs, qcs); @@ -1422,9 +1422,9 @@ static void qc_destroy(void *ctx) TRACE_LEAVE(QMUX_EV_QCC_END); } -static void qc_detach(struct sedesc *endp) +static void qc_detach(struct sedesc *sd) { - struct qcs *qcs = endp->se; + struct qcs *qcs = sd->se; struct qcc *qcc = qcs->qcc; TRACE_ENTER(QMUX_EV_STRM_END, qcc->conn, qcs); @@ -1499,15 +1499,15 @@ static size_t qc_rcv_buf(struct stconn *sc, struct buffer *buf, end: if (b_data(&qcs->rx.app_buf)) { - se_fl_set(qcs->endp, SE_FL_RCV_MORE | SE_FL_WANT_ROOM); + se_fl_set(qcs->sd, SE_FL_RCV_MORE | SE_FL_WANT_ROOM); } else { - se_fl_clr(qcs->endp, SE_FL_RCV_MORE | SE_FL_WANT_ROOM); - if (se_fl_test(qcs->endp, SE_FL_ERR_PENDING)) - se_fl_set(qcs->endp, SE_FL_ERROR); + se_fl_clr(qcs->sd, SE_FL_RCV_MORE | SE_FL_WANT_ROOM); + if (se_fl_test(qcs->sd, SE_FL_ERR_PENDING)) + se_fl_set(qcs->sd, SE_FL_ERROR); if (fin) - se_fl_set(qcs->endp, SE_FL_EOI); + se_fl_set(qcs->sd, SE_FL_EOI); if (b_size(&qcs->rx.app_buf)) { b_free(&qcs->rx.app_buf); @@ -1582,20 +1582,20 @@ static int qc_wake_some_streams(struct qcc *qcc) node = eb64_next(node)) { qcs = eb64_entry(node, struct qcs, by_id); - if (!qcs->endp || !qcs->endp->sc) + if (!qcs->sd || !qcs->sd->sc) continue; if (qcc->conn->flags & CO_FL_ERROR) { - se_fl_set(qcs->endp, SE_FL_ERR_PENDING); - if (se_fl_test(qcs->endp, SE_FL_EOS)) - se_fl_set(qcs->endp, SE_FL_ERROR); + se_fl_set(qcs->sd, SE_FL_ERR_PENDING); + if (se_fl_test(qcs->sd, SE_FL_EOS)) + se_fl_set(qcs->sd, SE_FL_ERROR); if (qcs->subs) { qcs_notify_recv(qcs); qcs_notify_send(qcs); } - else if (qcs->endp->sc->app_ops->wake) { - qcs->endp->sc->app_ops->wake(qcs->endp->sc); + else if (qcs->sd->sc->app_ops->wake) { + qcs->sd->sc->app_ops->wake(qcs->sd->sc); } } }