CLEANUP: mux-quic: rename the "endp" field to "sd"
The stream endpoint descriptor that was named "endp" is now called "sd"
both in the qcs struct and in the few functions using this.
diff --git a/include/haproxy/mux_quic-t.h b/include/haproxy/mux_quic-t.h
index 80fa683..fa83a19 100644
--- a/include/haproxy/mux_quic-t.h
+++ b/include/haproxy/mux_quic-t.h
@@ -104,7 +104,7 @@
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 9c89c18..3c713a3 100644
--- a/include/haproxy/mux_quic.h
+++ b/include/haproxy/mux_quic.h
@@ -96,18 +96,18 @@
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 @@
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 b1cd313..a904c97 100644
--- a/src/mux_quic.c
+++ b/src/mux_quic.c
@@ -124,7 +124,7 @@
qcs->stream = NULL;
qcs->qcc = qcc;
- qcs->endp = NULL;
+ qcs->sd = NULL;
qcs->flags = QC_SF_NONE;
qcs->ctx = NULL;
@@ -213,8 +213,8 @@
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 @@
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 @@
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 @@
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);
}
}
}