]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: warning on multiple -x
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 19 Jun 2017 14:37:19 +0000 (16:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 12:43:28 +0000 (14:43 +0200)
Multiple use of the -x option is useless, emit a warning.

src/haproxy.c

index 2fd387f3ef97bc5f611084aace2a43bf1b79ec8e..1eabb552949a5f975d7a90ddb2245d4c9056ae9e 100644 (file)
@@ -1283,7 +1283,10 @@ static void init(int argc, char **argv)
                                        Alert("Unix socket path expected with the -x flag\n\n");
                                        usage(progname);
                                }
+                               if (old_unixsocket)
+                                       Warning("-x option already set, overwriting the value\n");
                                old_unixsocket = argv[1];
+
                                argv++;
                                argc--;
                        }