]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: unconst mux's get_fist_cs() callback function
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 1 Apr 2022 11:21:41 +0000 (13:21 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 13 Apr 2022 13:10:15 +0000 (15:10 +0200)
This change is mandatory for next commits.

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

index bb1601cebe45dd9d27e5ad55360320ab1c421a6b..b0fc809858d6ad44266d0cea3fdbd86b35900767 100644 (file)
@@ -235,7 +235,7 @@ static inline void cs_set_error(struct conn_stream *cs)
  * conn_stream, NULL is returned. The output pointer is purposely marked
  * const to discourage the caller from modifying anything there.
  */
-static inline const struct conn_stream *cs_conn_get_first(const struct connection *conn)
+static inline struct conn_stream *cs_conn_get_first(const struct connection *conn)
 {
        BUG_ON(!conn || !conn->mux);
 
index 644a3fd4a3bcad8af5769d2599faec28145d2c2e..773610803d712df8d035a0a1a1c7c6a7d42c752a 100644 (file)
@@ -396,7 +396,7 @@ struct mux_ops {
        void (*shutw)(struct conn_stream *cs, enum co_shw_mode);     /* shutw function */
 
        int (*attach)(struct connection *conn, struct conn_stream *, struct session *sess); /* attach a conn_stream to an outgoing connection */
-       const struct conn_stream *(*get_first_cs)(const struct connection *); /* retrieves any valid conn_stream from this connection */
+       struct conn_stream *(*get_first_cs)(const struct connection *); /* retrieves any valid conn_stream from this connection */
        void (*detach)(struct conn_stream *); /* Detach a conn_stream from an outgoing connection, when the request is done */
        int (*show_fd)(struct buffer *, struct connection *); /* append some data about connection into chunk for "show fd"; returns non-zero if suspicious */
        int (*subscribe)(struct conn_stream *cs, int event_type,  struct wait_event *es); /* Subscribe <es> to events, such as "being able to send" */
index 5996e7e22a7719067084093167f2502d09487ea4..d87fc9e5b4492497fc5f7796741523710dc3c002 100644 (file)
@@ -3552,7 +3552,7 @@ static int fcgi_attach(struct connection *conn, struct conn_stream *cs, struct s
  * beneficial to scan backwards from the end to reduce the likeliness to find
  * orphans.
  */
-static const struct conn_stream *fcgi_get_first_cs(const struct connection *conn)
+static struct conn_stream *fcgi_get_first_cs(const struct connection *conn)
 {
        struct fcgi_conn *fconn = conn->ctx;
        struct fcgi_strm *fstrm;
index d7fd3da8f8da62f28d384fee0b4d50491868182f..eeb9bad0d8f58003af032ce721e6296974ce3f2d 100644 (file)
@@ -3320,7 +3320,7 @@ static int h1_attach(struct connection *conn, struct conn_stream *cs, struct ses
 /* Retrieves a valid conn_stream from this connection, or returns NULL. For
  * this mux, it's easy as we can only store a single conn_stream.
  */
-static const struct conn_stream *h1_get_first_cs(const struct connection *conn)
+static struct conn_stream *h1_get_first_cs(const struct connection *conn)
 {
        struct h1c *h1c = conn->ctx;
        struct h1s *h1s = h1c->h1s;
index d39de940941100bf95c32bb5ed854374bc00acbb..d9ecf6d0dbe5b5fe5de2da7bb4bb7f3f5b93a991 100644 (file)
@@ -4299,7 +4299,7 @@ static int h2_attach(struct connection *conn, struct conn_stream *cs, struct ses
  * beneficial to scan backwards from the end to reduce the likeliness to find
  * orphans.
  */
-static const struct conn_stream *h2_get_first_cs(const struct connection *conn)
+static struct conn_stream *h2_get_first_cs(const struct connection *conn)
 {
        struct h2c *h2c = conn->ctx;
        struct h2s *h2s;
index 97b3b835da0942edfcff8db040303b8291f2fd29..0c36c794ed3335ca864e0ac63d88316b8b41b32b 100644 (file)
@@ -399,7 +399,7 @@ static int mux_pt_attach(struct connection *conn, struct conn_stream *cs, struct
 /* Retrieves a valid conn_stream from this connection, or returns NULL. For
  * this mux, it's easy as we can only store a single conn_stream.
  */
-static const struct conn_stream *mux_pt_get_first_cs(const struct connection *conn)
+static struct conn_stream *mux_pt_get_first_cs(const struct connection *conn)
 {
        struct mux_pt_ctx *ctx = conn->ctx;