]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: rhttp: remove the unused outgoing connect() function
authorWilly Tarreau <w@1wt.eu>
Fri, 17 Nov 2023 09:52:13 +0000 (10:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 17 Nov 2023 17:10:16 +0000 (18:10 +0100)
A dummy connect() function previously had to be installed for the log
server so that a reverse-http address could be referenced on a "server"
line, but after the recent rework of the server line parsing, this is
no longer needed, and this is actually annoying as it makes one believe
there is a way to connect outside, which is not true. Let's now get rid
of this function.

include/haproxy/proto_reverse_connect.h
src/proto_reverse_connect.c

index a2113d35c10c66c96b3722696509d1da682db3be..0c07356e090408312df8aa3a550a24c316411403 100644 (file)
@@ -14,8 +14,6 @@ struct connection *rev_accept_conn(struct listener *l, int *status);
 void rev_unbind_receiver(struct listener *l);
 int rev_set_affinity(struct connection *conn, int new_tid);
 
-int rev_connect(struct connection *conn, int flags);
-
 int rev_accepting_conn(const struct receiver *rx);
 
 void rev_notify_preconn_err(struct listener *l);
index 6c0b1e4c4d9993d59665ebfd0029c205c655ab14..e46d8c397554c45a5fe4af555ff6889b2a14303d 100644 (file)
@@ -28,7 +28,7 @@ struct proto_fam proto_fam_reverse_connect = {
 struct protocol proto_reverse_connect = {
        .name = "rev",
 
-       /* connection layer */
+       /* connection layer (no outgoing connection) */
        .listen      = rev_bind_listener,
        .enable      = rev_enable_listener,
        .disable     = rev_disable_listener,
@@ -38,8 +38,6 @@ struct protocol proto_reverse_connect = {
        .accept_conn = rev_accept_conn,
        .set_affinity = rev_set_affinity,
 
-       .connect     = rev_connect,
-
        /* address family */
        .fam  = &proto_fam_reverse_connect,
 
@@ -373,12 +371,6 @@ int rev_set_affinity(struct connection *conn, int new_tid)
        return -1;
 }
 
-/* Simple callback to enable definition of passive HTTP reverse servers. */
-int rev_connect(struct connection *conn, int flags)
-{
-       return SF_ERR_NONE;
-}
-
 int rev_accepting_conn(const struct receiver *rx)
 {
        return 1;