]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: connection: remove an unwelcome dependency on struct stream
authorWilly Tarreau <w@1wt.eu>
Wed, 19 Dec 2018 13:36:29 +0000 (14:36 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Dec 2018 13:36:29 +0000 (14:36 +0100)
commit94031d30d71eea0fcb4e7a29388e62ee151a7ddf
tree96f55117a56b50574b1625a0b8f3318ab077afe5
parent3d2ee55ebd0d3fc1bfab11735f41206d8f023ab0
MINOR: connection: remove an unwelcome dependency on struct stream

There was a reference to struct stream in conn_free() for the case
where we're freeing a connection that doesn't have a mux attached.
For now we know it's always a stream, and we only need to do it to
put a NULL in s->si[1].end.

Let's do it better by storing the pointer to si[1].end in the context
and specifying that this pointer is always nulled if the mux is null.
This way it allows a connection to detach itself from wherever it's
being used. Maybe we could even get rid of the condition on the mux.
include/proto/connection.h
src/backend.c