From: Christopher Faulet Date: Thu, 23 Dec 2021 12:58:12 +0000 (+0100) Subject: MINOR: httpclient: Always access the stream-int via the conn-stream X-Git-Tag: v2.6-dev2~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b91afea91cf446069172ff962891e9782af36e63;p=thirdparty%2Fhaproxy.git MINOR: httpclient: Always access the stream-int via the conn-stream 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. --- diff --git a/src/http_client.c b/src/http_client.c index 6b060a1423..9cbecf0686 100644 --- a/src/http_client.c +++ b/src/http_client.c @@ -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;