]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: mux-quic: always take the endp from the qcs not the cs
authorWilly Tarreau <w@1wt.eu>
Tue, 10 May 2022 09:24:26 +0000 (11:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 13 May 2022 12:27:57 +0000 (14:27 +0200)
At a few places the endpoint pointer was retrieved from the conn_stream
while it's safer and more long-term proof to take it from the qcs. Let's
just do that.

src/mux_quic.c

index d5f448ca5e0e6ac65082c3578a1b417a82f8f7e3..0d7d4240f55f0fbdc347ea1591527116c2ab69d7 100644 (file)
@@ -1298,15 +1298,15 @@ static size_t qc_rcv_buf(struct conn_stream *cs, struct buffer *buf,
 
  end:
        if (b_data(&qcs->rx.app_buf)) {
-               cs->endp->flags |= (CS_EP_RCV_MORE | CS_EP_WANT_ROOM);
+               qcs->endp->flags |= (CS_EP_RCV_MORE | CS_EP_WANT_ROOM);
        }
        else {
-               cs->endp->flags &= ~(CS_EP_RCV_MORE | CS_EP_WANT_ROOM);
-               if (cs->endp->flags & CS_EP_ERR_PENDING)
-                       cs->endp->flags |= CS_EP_ERROR;
+               qcs->endp->flags &= ~(CS_EP_RCV_MORE | CS_EP_WANT_ROOM);
+               if (qcs->endp->flags & CS_EP_ERR_PENDING)
+                       qcs->endp->flags |= CS_EP_ERROR;
 
                if (fin)
-                       cs->endp->flags |= CS_EP_EOI;
+                       qcs->endp->flags |= CS_EP_EOI;
 
                if (b_size(&qcs->rx.app_buf)) {
                        b_free(&qcs->rx.app_buf);