diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-06-19 17:07:56 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-06-22 10:57:29 +0100 |
commit | 675b33dd2025cc1f8e732efa9ffc72d55e5a35d9 (patch) | |
tree | 1492d1527bd84c5b032ada128d88a1fb12449102 /src/worker_private.h | |
parent | eeb0beb73d7769341d1b6aa8fac4f27f7dc76b2e (diff) | |
download | rspamd-675b33dd2025cc1f8e732efa9ffc72d55e5a35d9.tar.gz rspamd-675b33dd2025cc1f8e732efa9ffc72d55e5a35d9.zip |
[Project] Adopt normal worker and contorller
Diffstat (limited to 'src/worker_private.h')
-rw-r--r-- | src/worker_private.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/worker_private.h b/src/worker_private.h index 35a2b465b..6d0e763aa 100644 --- a/src/worker_private.h +++ b/src/worker_private.h @@ -30,14 +30,13 @@ struct rspamd_lang_detector; struct rspamd_worker_ctx { guint64 magic; /* Events base */ - struct ev_loop *ev_base; + struct ev_loop *event_loop; /* DNS resolver */ struct rspamd_dns_resolver *resolver; /* Config */ struct rspamd_config *cfg; - guint32 timeout; - struct timeval io_tv; + ev_tstamp timeout; /* Detect whether this worker is mime worker */ gboolean is_mime; /* Allow encrypted requests only using network */ @@ -45,7 +44,7 @@ struct rspamd_worker_ctx { /* Limit of tasks */ guint32 max_tasks; /* Maximum time for task processing */ - gdouble task_timeout; + ev_tstamp task_timeout; /* Encryption key */ struct rspamd_cryptobox_keypair *key; /* Keys cache */ @@ -64,11 +63,11 @@ void rspamd_worker_init_scanner (struct rspamd_worker *worker, /* * Called on forced timeout */ -void rspamd_task_timeout (gint fd, short what, gpointer ud); +void rspamd_task_timeout (EV_P_ ev_timer *w, int revents); /* * Called on unexpected IO error (e.g. ECONNRESET) */ -void rspamd_worker_guard_handler (gint fd, short what, void *data); +void rspamd_worker_guard_handler (EV_P_ ev_io *w, int revents); #endif |