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.
This commit is contained in:
Christopher Faulet 2021-12-23 13:58:12 +01:00
parent e1ede302c3
commit b91afea91c

View File

@ -506,7 +506,7 @@ struct appctx *httpclient_start(struct httpclient *hc)
else else
ss_dst = &ss_url; 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__); ha_alert("httpclient: Failed to initialize stream in %s:%d.\n", __FUNCTION__, __LINE__);
goto out_free_stream; goto out_free_stream;
} }
@ -527,11 +527,11 @@ struct appctx *httpclient_start(struct httpclient *hc)
} }
s->flags |= SF_ASSIGNED|SF_ADDR_SET; 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; s->res.flags |= CF_READ_DONTWAIT;
/* applet is waiting for data */ /* applet is waiting for data */
si_cant_get(&s->si[0]); si_cant_get(cs_si(s->csf));
appctx_wakeup(appctx); appctx_wakeup(appctx);
hc->appctx = appctx; hc->appctx = appctx;