MEDIUM: mux: provide the session to the init() and attach() method.
Instead of trying to get the session from the connection, which is not
always there, and of course there could be multiple sessions per connection,
provide it with the init() and attach() methods, so that we know the
session for each outgoing stream.
diff --git a/src/checks.c b/src/checks.c
index 282ed88..e4bb732 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -1604,7 +1604,7 @@
clear_addr(&conn->addr.from);
conn_prepare(conn, proto, check->xprt);
- conn_install_mux(conn, &mux_pt_ops, cs, s->proxy);
+ conn_install_mux(conn, &mux_pt_ops, cs, s->proxy, NULL);
cs_attach(cs, check, &check_conn_cb);
/* only plain tcp-check supports quick ACK */
@@ -2787,7 +2787,7 @@
}
conn_prepare(conn, proto, xprt);
- conn_install_mux(conn, &mux_pt_ops, cs, s->proxy);
+ conn_install_mux(conn, &mux_pt_ops, cs, s->proxy, NULL);
cs_attach(cs, check, &check_conn_cb);
ret = SF_ERR_INTERNAL;