MEDIUM: conn_stream: Add a pointer to the app object into the conn-stream
In the same way the conn-stream has a pointer to the stream endpoint , this
patch adds a pointer to the application entity in the conn-stream
structure. For now, it is a stream or a health-check. It is mandatory to
merge the stream-interface with the conn-stream.
diff --git a/src/stream.c b/src/stream.c
index dd6ae6f..f018c37 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -275,8 +275,7 @@
*/
int stream_upgrade_from_cs(struct conn_stream *cs, struct buffer *input)
{
- struct stream_interface *si = cs->data;
- struct stream *s = si_strm(si);
+ struct stream *s = cs_strm(cs);
if (cs_conn_mux(cs)) {
const struct mux_ops *mux = cs_conn_mux(cs);
@@ -475,7 +474,7 @@
if (likely(sess->fe->options2 & PR_O2_INDEPSTR))
s->si[1].flags |= SI_FL_INDEP_STR;
- s->si[1].cs = cs_new(NULL);
+ s->si[1].cs = cs_new(NULL, NULL, &s->obj_type, &s->si[1], NULL);
if (!s->si[1].cs)
goto out_fail_alloc_cs;