]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] optionnal '-s' command line argument could clobber '-st' and '-sf'
authorwilly tarreau <willy@wtap.(none)>
Sat, 15 Apr 2006 17:25:16 +0000 (19:25 +0200)
committerwilly tarreau <willy@wtap.(none)>
Sat, 15 Apr 2006 17:25:16 +0000 (19:25 +0200)
haproxy.c

index 2f9c89c7df8bf6861e756536be7059d72c7344df..cdff36e3d82f8057890fd350099762ffbe532f29 100644 (file)
--- a/haproxy.c
+++ b/haproxy.c
@@ -8122,12 +8122,6 @@ void init(int argc, char **argv) {
                arg_mode |= MODE_DAEMON | MODE_QUIET;
            else if (*flag == 'q')
                arg_mode |= MODE_QUIET;
-#if STATTIME > 0
-           else if (*flag == 's')
-               arg_mode |= MODE_STATS;
-           else if (*flag == 'l')
-               arg_mode |= MODE_LOG;
-#endif
            else if (*flag == 's' && (flag[1] == 'f' || flag[1] == 't')) {
                /* list of pids to finish ('f') or terminate ('t') */
 
@@ -8148,6 +8142,12 @@ void init(int argc, char **argv) {
                    }
                }
            }
+#if STATTIME > 0
+           else if (*flag == 's')
+               arg_mode |= MODE_STATS;
+           else if (*flag == 'l')
+               arg_mode |= MODE_LOG;
+#endif
            else { /* >=2 args */
                argv++; argc--;
                if (argc == 0)