aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-20 10:28:23 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-22 10:57:29 +0100
commitf133f139d57eff6d5c8ffe57687703620a388e28 (patch)
treef9d07c887e1cf462df10bf5f4e395fc5bacb051d /src/libstat
parentdc96f9b37ff98c12b7aeacd348162950c129098f (diff)
downloadrspamd-f133f139d57eff6d5c8ffe57687703620a388e28.tar.gz
rspamd-f133f139d57eff6d5c8ffe57687703620a388e28.zip
[Minor] Fix some missing userdata
Diffstat (limited to 'src/libstat')
-rw-r--r--src/libstat/backends/redis_backend.c2
-rw-r--r--src/libstat/stat_config.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c
index 5d8ccc065..e430e491e 100644
--- a/src/libstat/backends/redis_backend.c
+++ b/src/libstat/backends/redis_backend.c
@@ -1593,6 +1593,7 @@ rspamd_redis_process_tokens (struct rspamd_task *task,
ev_timer_again (task->event_loop, &rt->timeout_event);
}
else {
+ rt->timeout_event.data = rt;
ev_timer_init (&rt->timeout_event, rspamd_redis_timeout,
rt->ctx->timeout, 0.);
ev_timer_start (task->event_loop, &rt->timeout_event);
@@ -1804,6 +1805,7 @@ rspamd_redis_learn_tokens (struct rspamd_task *task, GPtrArray *tokens,
ev_timer_again (task->event_loop, &rt->timeout_event);
}
else {
+ rt->timeout_event.data = rt;
ev_timer_init (&rt->timeout_event, rspamd_redis_timeout,
rt->ctx->timeout, 0.);
ev_timer_start (task->event_loop, &rt->timeout_event);
diff --git a/src/libstat/stat_config.c b/src/libstat/stat_config.c
index 52c78ba6b..bc4c28b5d 100644
--- a/src/libstat/stat_config.c
+++ b/src/libstat/stat_config.c
@@ -558,6 +558,7 @@ rspamd_stat_ctx_register_async (rspamd_stat_async_handler handler,
* First we set timeval to zero as we want cb to be executed as
* fast as possible
*/
+ elt->timer_ev.data = elt;
ev_timer_init (&elt->timer_ev, rspamd_async_elt_on_timer, 0.0, 0.0);
ev_timer_start (st_ctx->event_loop, &elt->timer_ev);
}