From 2c8ed95980462b03fb3ca0ae7721357952d7361b Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 23 Jul 2013 15:17:31 +0100 Subject: Fix a problem with listening on sockets. Add stat_reset command to rspamc while I'm here. --- src/client/rspamc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/client') diff --git a/src/client/rspamc.c b/src/client/rspamc.c index 1819d7e9c..9279682e4 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -75,6 +75,7 @@ enum rspamc_command { RSPAMC_COMMAND_FUZZY_ADD, RSPAMC_COMMAND_FUZZY_DEL, RSPAMC_COMMAND_STAT, + RSPAMC_COMMAND_STAT_RESET, RSPAMC_COMMAND_COUNTERS, RSPAMC_COMMAND_UPTIME, RSPAMC_COMMAND_ADD_SYMBOL, @@ -131,6 +132,9 @@ check_rspamc_command (const gchar *cmd) else if (g_ascii_strcasecmp (cmd, "STAT") == 0) { return RSPAMC_COMMAND_STAT; } + else if (g_ascii_strcasecmp (cmd, "STAT_RESET") == 0) { + return RSPAMC_COMMAND_STAT_RESET; + } else if (g_ascii_strcasecmp (cmd, "COUNTERS") == 0) { return RSPAMC_COMMAND_COUNTERS; } @@ -849,6 +853,9 @@ main (gint argc, gchar **argv, gchar **env) case RSPAMC_COMMAND_STAT: rspamc_do_controller_simple_command ("stat", NULL); break; + case RSPAMC_COMMAND_STAT_RESET: + rspamc_do_controller_simple_command ("stat_reset", NULL); + break; case RSPAMC_COMMAND_COUNTERS: show_rspamd_counters (); break; -- cgit v1.2.3