}
/* finds the best mux for incoming connection <conn>, a proxy in and http mode
- * <mode>, and installs it on the connection for direction <dir> (MUX_INBOUND/
- * MUX_OUTBOUND). Returns < 0 on error.
+ * <mode>, and installs it on the connection for upper context <ctx>. Returns
+ * < 0 on error.
*/
-static inline int conn_install_best_mux(struct connection *conn, int mode, enum mux_dir dir)
+static inline int conn_install_best_mux(struct connection *conn, int mode, void *ctx)
{
const struct mux_ops *mux_ops;
mux_ops = conn_find_best_mux(conn, mode);
if (!mux_ops)
return -1;
- return conn_install_mux(conn, mux_ops, dir);
+ return conn_install_mux(conn, mux_ops, ctx);
}
#endif /* _PROTO_CONNECTION_H */
#include <proto/connection.h>
#include <proto/listener.h>
#include <proto/log.h>
-#include <proto/mux_pt.h>
#include <proto/proto_http.h>
#include <proto/proxy.h>
#include <proto/session.h>
goto fail;
session_count_new(sess);
- if (conn_install_mux(conn, &mux_pt_ops, NULL) < 0)
+ if (conn_install_best_mux(conn, sess->fe->mode == PR_MODE_HTTP, NULL) < 0)
goto fail;
/* the embryonic session's task is not needed anymore */