]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stream-int: Be able to allocate a CS without connection
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 16 Dec 2021 15:10:39 +0000 (16:10 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 24 Feb 2022 10:00:02 +0000 (11:00 +0100)
si_alloc_cs() function may now be called without connection. It is mandatory
to allocate the backend conn-stream during the stream creation.

include/haproxy/stream_interface.h

index acc22e756cc71cb92ec8f422bfb4cf40ca294e4d..da07127ffca0553aeb70c69a77c7dcf15521605f 100644 (file)
@@ -427,7 +427,7 @@ static inline struct conn_stream *si_alloc_cs(struct stream_interface *si, struc
 
        si_release_endpoint(si);
 
-       cs = cs_new(conn, conn->target);
+       cs = cs_new(conn, (conn ? conn->target : NULL));
        if (cs)
                si_attach_cs(si, cs);