aboutsummaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-07-23 15:17:31 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-07-23 15:17:31 +0100
commit2c8ed95980462b03fb3ca0ae7721357952d7361b (patch)
tree504219e0af7c9d7902da21e318585fdb9f866ac9 /src/client
parentf59c88c67b8a546e5067a7f979c09f683097658b (diff)
downloadrspamd-2c8ed95980462b03fb3ca0ae7721357952d7361b.tar.gz
rspamd-2c8ed95980462b03fb3ca0ae7721357952d7361b.zip
Fix a problem with listening on sockets.
Add stat_reset command to rspamc while I'm here.
Diffstat (limited to 'src/client')
-rw-r--r--src/client/rspamc.c7
1 files changed, 7 insertions, 0 deletions
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;