]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mworker: stores the mcli_reload bind_conf
authorWilliam Lallemand <wlallemand@haproxy.org>
Sat, 24 Sep 2022 13:56:25 +0000 (15:56 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Sat, 24 Sep 2022 13:56:25 +0000 (15:56 +0200)
Stores the mcli_reload bind_conf in order to identify it later.

include/haproxy/cli.h
src/cli.c
src/haproxy.c

index 844df15e5e90ed57e47ade6e389781861041c968..379bc3863de17ffa6bea784a616f426616982253 100644 (file)
@@ -46,6 +46,8 @@ struct bind_conf *mworker_cli_proxy_new_listener(char *line);
 int mworker_cli_sockpair_new(struct mworker_proc *mworker_proc, int proc);
 void mworker_cli_proxy_stop(void);
 
+extern struct bind_conf *mcli_reload_bind_conf;
+
 /* proxy mode cli functions */
 
 /* analyzers */
index c0d8efabfc6b05b2e5656e1521ae57042e39bf6e..1391345b3785707599a0a4a755a7dd5b3b1cfcad 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -85,6 +85,7 @@ static struct cli_kw_list cli_keywords = {
 extern const char *stat_status_codes[];
 
 struct proxy *mworker_proxy; /* CLI proxy of the master */
+struct bind_conf *mcli_reload_bind_conf;
 
 /* CLI context for the "show activity" command */
 struct show_activity_ctx {
index 93502160f416991f6259966c969b74bc5d893669..1ec16b7d79fb05100f90ff977e14ba9a11697b3c 100644 (file)
@@ -2131,7 +2131,8 @@ static void init(int argc, char **argv)
                        }
                        /* Create the mcli_reload listener from the proc_self struct */
                        memprintf(&path, "sockpair@%d", proc_self->ipc_fd[1]);
-                       if (mworker_cli_proxy_new_listener(path) == NULL) {
+                       mcli_reload_bind_conf = mworker_cli_proxy_new_listener(path);
+                       if (mcli_reload_bind_conf == NULL) {
                                ha_alert("Cannot create the mcli_reload listener.\n");
                                exit(EXIT_FAILURE);
                        }