aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/rspamc.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-10 18:25:09 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-10 18:25:09 +0300
commiteda90216086cafa5c84f7a13f4d5bf72d4e225bd (patch)
tree84c75e0eda4dfa26209ab71d93165b19b6307283 /src/client/rspamc.c
parentaa959154787b080cdfa5efe09e5c927381d095a2 (diff)
downloadrspamd-eda90216086cafa5c84f7a13f4d5bf72d4e225bd.tar.gz
rspamd-eda90216086cafa5c84f7a13f4d5bf72d4e225bd.zip
Fix race in surbl module.
Add more debugging to destructors in pools.
Diffstat (limited to 'src/client/rspamc.c')
-rw-r--r--src/client/rspamc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/rspamc.c b/src/client/rspamc.c
index ceb76169a..f7ce4e9bc 100644
--- a/src/client/rspamc.c
+++ b/src/client/rspamc.c
@@ -36,6 +36,7 @@ static gchar *statfile;
static gchar *ip;
static gint weight = 1;
static gint flag;
+static gint timeout = 5;
static gboolean pass_all;
static gboolean tty = FALSE;
static gboolean verbose = FALSE;
@@ -50,6 +51,7 @@ static GOptionEntry entries[] =
{ "pass", 'p', 0, G_OPTION_ARG_NONE, &pass_all, "Pass all filters", NULL },
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "More verbose output", NULL },
{ "ip", 'i', 0, G_OPTION_ARG_STRING, &ip, "Emulate that message was received from specified ip address", NULL },
+ { "timeout", 't', 0, G_OPTION_ARG_INT, &timeout, "Timeout for waiting for a reply", NULL },
{ NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
};
@@ -551,6 +553,7 @@ main (gint argc, gchar **argv, gchar **env)
rspamd_client_init ();
read_cmd_line (&argc, &argv);
+ rspamd_set_timeout (1000, timeout * 1000);
tty = isatty (STDOUT_FILENO);
/* Now read other args from argc and argv */
if (argc == 1) {