]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: No longer include stconn type header in connection-t.h
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 4 Jul 2024 08:09:16 +0000 (10:09 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Jul 2024 13:27:04 +0000 (15:27 +0200)
It is a small change, but it is cleaner to no include stconn-t.h header in
connection-t.h, mainly to avoid circular definitions.

The related issue is #2502.

include/haproxy/connection-t.h
src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c
src/mux_pt.c
src/mux_quic.c

index dba52fa320516f1efeede824c6532199c271ccb3..41c937c8c82758d851ebec119e81a21d1377f195 100644 (file)
@@ -37,7 +37,6 @@
 #include <haproxy/port_range-t.h>
 #include <haproxy/protocol-t.h>
 #include <haproxy/show_flags-t.h>
-#include <haproxy/stconn-t.h>
 #include <haproxy/task-t.h>
 #include <haproxy/thread-t.h>
 
@@ -45,6 +44,7 @@
 struct connection;
 struct stconn;
 struct sedesc;
+struct se_abort_info;
 struct cs_info;
 struct buffer;
 struct proxy;
@@ -414,7 +414,7 @@ struct mux_ops {
        size_t (*done_fastfwd)(struct stconn *sc); /* Callback to terminate fast data forwarding */
        int (*fastfwd)(struct stconn *sc, unsigned int count, unsigned int flags); /* Callback to init fast data forwarding */
        int (*resume_fastfwd)(struct stconn *sc, unsigned int flags); /* Callback to resume fast data forwarding */
-       void (*shut)(struct stconn *sc, enum se_shut_mode, struct se_abort_info *reason); /* shutdown function */
+       void (*shut)(struct stconn *sc, unsigned int mode, struct se_abort_info *reason); /* shutdown function */
 
        int (*attach)(struct connection *conn, struct sedesc *, struct session *sess); /* attach a stconn to an outgoing connection */
        struct stconn *(*get_first_sc)(const struct connection *); /* retrieves any valid stconn from this connection */
index 102a4f0d9da19fbbb51d4051f2d6f0edaa851c87..1ba4612dadb3d819cc31e5996ee2cbbfaf943b12 100644 (file)
@@ -3794,7 +3794,7 @@ struct task *fcgi_deferred_shut(struct task *t, void *ctx, unsigned int state)
        return NULL;
 }
 
-static void fcgi_shut(struct stconn *sc, enum se_shut_mode mode, struct se_abort_info *reason)
+static void fcgi_shut(struct stconn *sc, unsigned int mode, struct se_abort_info *reason)
 {
        struct fcgi_strm *fstrm = __sc_mux_strm(sc);
 
index 61c8516209cedc02ee821f9f36a41dd7deec2042..ed503f565a361194627426efc535ee376d275a97 100644 (file)
@@ -4370,7 +4370,7 @@ static void h1_detach(struct sedesc *sd)
        TRACE_LEAVE(H1_EV_STRM_END);
 }
 
-static void h1_shut(struct stconn *sc, enum se_shut_mode mode, struct se_abort_info *reason)
+static void h1_shut(struct stconn *sc, unsigned int mode, struct se_abort_info *reason)
 {
        struct h1s *h1s = __sc_mux_strm(sc);
        struct h1c *h1c;
index c28c5e1a8d094874f464720cd66e329bb6c57ff4..b2b1d4718183797e67debccd0215a9e8985a9226 100644 (file)
@@ -5110,7 +5110,7 @@ struct task *h2_deferred_shut(struct task *t, void *ctx, unsigned int state)
        return t;
 }
 
-static void h2_shut(struct stconn *sc, enum se_shut_mode mode, struct se_abort_info *reason)
+static void h2_shut(struct stconn *sc, unsigned int mode, struct se_abort_info *reason)
 {
        struct h2s *h2s = __sc_mux_strm(sc);
 
index 6dbbe04cd17a482b6a2429c5fb9dcc0acb7e8c37..b3f850906e871ebf9c68e4bcbabdb7332c09658b 100644 (file)
@@ -462,7 +462,7 @@ static int mux_pt_avail_streams(struct connection *conn)
        return 1 - mux_pt_used_streams(conn);
 }
 
-static void mux_pt_shut(struct stconn *sc, enum se_shut_mode mode, struct se_abort_info *reason)
+static void mux_pt_shut(struct stconn *sc, unsigned int mode, struct se_abort_info *reason)
 {
        struct connection *conn = __sc_conn(sc);
        struct mux_pt_ctx *ctx = conn->ctx;
index 8e7f1c326c3e2009001aa1b5381561de97d951f9..bcf2b7034a966e01a8a7edf8ab70950980eee3de 100644 (file)
@@ -3131,7 +3131,7 @@ static int qmux_wake(struct connection *conn)
        return 1;
 }
 
-static void qmux_strm_shut(struct stconn *sc, enum se_shut_mode mode, struct se_abort_info *reason)
+static void qmux_strm_shut(struct stconn *sc, unsigned int mode, struct se_abort_info *reason)
 {
        struct qcs *qcs = __sc_mux_strm(sc);
        struct qcc *qcc = qcs->qcc;