From f592a0d5dd31e951fe8bcd4fd7d1d82b6c3ca708 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 17 Nov 2023 10:52:13 +0100 Subject: [PATCH] MINOR: rhttp: remove the unused outgoing connect() function 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 | 2 -- src/proto_reverse_connect.c | 10 +--------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/include/haproxy/proto_reverse_connect.h b/include/haproxy/proto_reverse_connect.h index a2113d35c..0c07356e0 100644 --- a/include/haproxy/proto_reverse_connect.h +++ b/include/haproxy/proto_reverse_connect.h @@ -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); diff --git a/src/proto_reverse_connect.c b/src/proto_reverse_connect.c index 6c0b1e4c4..e46d8c397 100644 --- a/src/proto_reverse_connect.c +++ b/src/proto_reverse_connect.c @@ -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;