commit f133f13: [Minor] Fix some missing userdata
Vsevolod Stakhov
vsevolod at highsecure.ru
Sat Jun 22 12:14:35 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-06-20 10:28:23 +0100
URL: https://github.com/rspamd/rspamd/commit/f133f139d57eff6d5c8ffe57687703620a388e28
[Minor] Fix some missing userdata
---
src/libstat/backends/redis_backend.c | 2 ++
src/libstat/stat_config.c | 1 +
src/libutil/map.c | 1 +
src/rspamd.c | 1 +
4 files changed, 5 insertions(+)
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);
}
diff --git a/src/libutil/map.c b/src/libutil/map.c
index 3d9c84ea7..3ca94806f 100644
--- a/src/libutil/map.c
+++ b/src/libutil/map.c
@@ -1234,6 +1234,7 @@ rspamd_map_schedule_periodic (struct rspamd_map *map,
map->scheduled_check = TRUE;
REF_INIT_RETAIN (cbd, rspamd_map_periodic_dtor);
+ cbd->ev.data = cbd;
ev_timer_init (&cbd->ev, rspamd_map_periodic_callback, jittered_sec, 0.0);
ev_timer_start (map->event_loop, &cbd->ev);
diff --git a/src/rspamd.c b/src/rspamd.c
index 813b7b7bb..765b4bd2b 100644
--- a/src/rspamd.c
+++ b/src/rspamd.c
@@ -391,6 +391,7 @@ rspamd_fork_delayed (struct rspamd_worker_conf *cf,
tv.tv_sec = SOFT_FORK_TIME;
tv.tv_usec = 0;
REF_RETAIN (cf);
+ nw->wait_ev.data = nw;
ev_timer_init (&nw->wait_ev, rspamd_fork_delayed_cb, SOFT_FORK_TIME, 0.0);
ev_timer_start (rspamd_main->event_loop, &nw->wait_ev);
}
More information about the Commits
mailing list