aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/milter.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-18 19:07:25 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-22 10:57:29 +0100
commita3a8b32851bd236333af1353dad0d663f30a555d (patch)
treead9255b7e1b7a9057071b9aa65883c35a89d5703 /src/libserver/milter.c
parentd5a36f4f750e63294cefed10f55b29fe7409bba6 (diff)
downloadrspamd-a3a8b32851bd236333af1353dad0d663f30a555d.tar.gz
rspamd-a3a8b32851bd236333af1353dad0d663f30a555d.zip
[Project] More rework
Diffstat (limited to 'src/libserver/milter.c')
-rw-r--r--src/libserver/milter.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/libserver/milter.c b/src/libserver/milter.c
index f9b4eee8c..bb27d2ff1 100644
--- a/src/libserver/milter.c
+++ b/src/libserver/milter.c
@@ -1083,7 +1083,7 @@ rspamd_milter_handle_session (struct rspamd_milter_session *session,
gboolean
-rspamd_milter_handle_socket (gint fd, const struct timeval *tv,
+rspamd_milter_handle_socket (gint fd, ev_tstamp timeout,
rspamd_mempool_t *pool,
struct ev_loop *ev_base, rspamd_milter_finish finish_cb,
rspamd_milter_error error_cb, void *ud)
@@ -1108,6 +1108,7 @@ rspamd_milter_handle_socket (gint fd, const struct timeval *tv,
priv->pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), "milter");
priv->discard_on_reject = milter_ctx->discard_on_reject;
priv->quarantine_on_reject = milter_ctx->quarantine_on_reject;
+ priv->ev.timeout = timeout;
if (pool) {
/* Copy tag */
@@ -1117,14 +1118,6 @@ rspamd_milter_handle_socket (gint fd, const struct timeval *tv,
priv->headers = kh_init (milter_headers_hash_t);
kh_resize (milter_headers_hash_t, priv->headers, 32);
- if (tv) {
- memcpy (&priv->tv, tv, sizeof (*tv));
- priv->ptv = &priv->tv;
- }
- else {
- priv->ptv = NULL;
- }
-
session->priv = priv;
REF_INIT_RETAIN (session, rspamd_milter_session_dtor);