From 85d47f9d9855bb52f3bf556b99170b710bed1a08 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 21 Nov 2012 00:29:50 +0100 Subject: [PATCH] MINOR: cli: report an error message on missing argument to compression rate "set rate-limit http-compression global" needs an integer and must complain when it's not there. --- src/dumpstats.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dumpstats.c b/src/dumpstats.c index 2a07140ee..db82005ee 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -1274,6 +1274,12 @@ static int stats_sock_parse_request(struct stream_interface *si, char *line) if (strcmp(args[3], "global") == 0) { int v; + if (!*args[4]) { + si->applet.ctx.cli.msg = "Expects a maximum input byte rate in kB/s.\n"; + si->applet.st0 = STAT_CLI_PRINT; + return 1; + } + v = atoi(args[4]); global.comp_rate_lim = v * 1024; /* Kilo to bytes. */ }