]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: httpclient: Always access the stream-int via the conn-stream
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Dec 2021 12:58:12 +0000 (13:58 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 24 Feb 2022 10:00:02 +0000 (11:00 +0100)
To be able to move the stream-interface from the stream to the conn-stream,
all access to the SI is done via the conn-stream. This patch is limited to
the httpclient part.

src/http_client.c

index 6b060a14234a1330956a44c1ce175c841eae0e5b..9cbecf068683e600a60009aca935b69a7411d193 100644 (file)
@@ -506,7 +506,7 @@ struct appctx *httpclient_start(struct httpclient *hc)
        else
                ss_dst = &ss_url;
 
-       if (!sockaddr_alloc(&s->si[1].dst, ss_dst, sizeof(*hc->dst))) {
+       if (!sockaddr_alloc(&cs_si(s->csb)->dst, ss_dst, sizeof(*hc->dst))) {
                ha_alert("httpclient: Failed to initialize stream in %s:%d.\n", __FUNCTION__, __LINE__);
                goto out_free_stream;
        }
@@ -527,11 +527,11 @@ struct appctx *httpclient_start(struct httpclient *hc)
        }
 
        s->flags |= SF_ASSIGNED|SF_ADDR_SET;
-       s->si[1].flags |= SI_FL_NOLINGER;
+       cs_si(s->csb)->flags |= SI_FL_NOLINGER;
        s->res.flags |= CF_READ_DONTWAIT;
 
        /* applet is waiting for data */
-       si_cant_get(&s->si[0]);
+       si_cant_get(cs_si(s->csf));
        appctx_wakeup(appctx);
 
        hc->appctx = appctx;