]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: peers: Always access the stream-int via the conn-stream
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Dec 2021 12:35:56 +0000 (13:35 +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 peers part.

src/peers.c

index 76a091722b07a5d3c7f085e1730d3f6380dc10da..8e7246dc0b3fa02433de307b488fa3d6bb5df03a 100644 (file)
@@ -3216,15 +3216,15 @@ static struct appctx *peer_session_create(struct peers *peers, struct peer *peer
        }
 
        /* applet is waiting for data */
-       si_cant_get(&s->si[0]);
+       si_cant_get(cs_si(s->csf));
        appctx_wakeup(appctx);
 
        /* initiate an outgoing connection */
        s->target = peer_session_target(peer, s);
-       if (!sockaddr_alloc(&s->si[1].dst, &peer->addr, sizeof(peer->addr)))
+       if (!sockaddr_alloc(&(cs_si(s->csb)->dst), &peer->addr, sizeof(peer->addr)))
                goto out_free_strm;
        s->flags = SF_ASSIGNED|SF_ADDR_SET;
-       s->si[1].flags |= SI_FL_NOLINGER;
+       cs_si(s->csb)->flags |= SI_FL_NOLINGER;
 
        s->do_log = NULL;
        s->uniq_id = 0;