diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-06-17 20:25:48 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-06-17 20:25:48 +0400 |
commit | 26eed5a540674c0fce99883a64c7675d7c5cbb92 (patch) | |
tree | 76945e5ad58c561200ef09c739807af2b0e2e986 /src/smtp.c | |
parent | de84c16025fd54d2f1c67cfe6a462e9c929c6244 (diff) | |
download | rspamd-26eed5a540674c0fce99883a64c7675d7c5cbb92.tar.gz rspamd-26eed5a540674c0fce99883a64c7675d7c5cbb92.zip |
* Implement initial version of greylisting triplets storage
* Fix issues with smtp worker
Diffstat (limited to 'src/smtp.c')
-rw-r--r-- | src/smtp.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/smtp.c b/src/smtp.c index 709df3a7f..06fa501b5 100644 --- a/src/smtp.c +++ b/src/smtp.c @@ -954,7 +954,7 @@ static gboolean config_smtp_worker (struct rspamd_worker *worker) { struct smtp_worker_ctx *ctx; - char *value, *err_str; + char *value; uint32_t timeout; ctx = g_malloc0 (sizeof (struct smtp_worker_ctx)); @@ -980,14 +980,9 @@ config_smtp_worker (struct rspamd_worker *worker) } if ((value = g_hash_table_lookup (worker->cf->params, "smtp_timeout")) != NULL) { errno = 0; - timeout = strtoul (value, &err_str, 10); - if (errno != 0 || (err_str && *err_str != '\0')) { - msg_warn ("cannot parse timeout, invalid number: %s: %s", value, strerror (errno)); - } - else { - ctx->smtp_timeout.tv_sec = timeout / 1000; - ctx->smtp_timeout.tv_usec = timeout - ctx->smtp_timeout.tv_sec * 1000; - } + timeout = parse_seconds (value); + ctx->smtp_timeout.tv_sec = timeout / 1000; + ctx->smtp_timeout.tv_usec = timeout - ctx->smtp_timeout.tv_sec * 1000; } if ((value = g_hash_table_lookup (worker->cf->params, "smtp_delay")) != NULL) { ctx->smtp_delay = parse_seconds (value); |