diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-09-12 17:29:15 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-09-12 17:29:15 +0100 |
commit | c05c2b3b82b21c0cad3faf621a11ab9b250ec8e1 (patch) | |
tree | 8e67d1e24882ee2a9d2bc6b840ee69dd1e112d28 /src/libstat | |
parent | 52698bace7a7c18324f2adf5f1985d559330bab8 (diff) | |
download | rspamd-c05c2b3b82b21c0cad3faf621a11ab9b250ec8e1.tar.gz rspamd-c05c2b3b82b21c0cad3faf621a11ab9b250ec8e1.zip |
[Fix] Fix more issues with watching of async events
Diffstat (limited to 'src/libstat')
-rw-r--r-- | src/libstat/backends/redis_backend.c | 6 | ||||
-rw-r--r-- | src/libstat/learn_cache/redis_cache.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c index 7b49db59e..35930c923 100644 --- a/src/libstat/backends/redis_backend.c +++ b/src/libstat/backends/redis_backend.c @@ -1594,8 +1594,7 @@ rspamd_redis_process_tokens (struct rspamd_task *task, if (redisAsyncCommand (rt->redis, rspamd_redis_connected, rt, "HGET %s %s", rt->redis_object_expanded, learned_key) == REDIS_OK) { - rspamd_session_add_event (task->s, rspamd_redis_fin, rt, - rspamd_redis_stat_quark ()); + rspamd_session_add_event (task->s, NULL, rspamd_redis_fin, rt, rspamd_redis_stat_quark ()); rt->has_event = TRUE; if (event_get_base (&rt->timeout_event)) { @@ -1799,8 +1798,7 @@ rspamd_redis_learn_tokens (struct rspamd_task *task, GPtrArray *tokens, "RSIG"); } - rspamd_session_add_event (task->s, rspamd_redis_fin_learn, rt, - rspamd_redis_stat_quark ()); + rspamd_session_add_event (task->s, NULL, rspamd_redis_fin_learn, rt, rspamd_redis_stat_quark ()); rt->has_event = TRUE; /* Set timeout */ diff --git a/src/libstat/learn_cache/redis_cache.c b/src/libstat/learn_cache/redis_cache.c index fc928e75e..22de2c1bc 100644 --- a/src/libstat/learn_cache/redis_cache.c +++ b/src/libstat/learn_cache/redis_cache.c @@ -453,8 +453,7 @@ rspamd_stat_cache_redis_check (struct rspamd_task *task, if (redisAsyncCommand (rt->redis, rspamd_stat_cache_redis_get, rt, "HGET %s %s", rt->ctx->redis_object, h) == REDIS_OK) { - rspamd_session_add_event (task->s, rspamd_redis_cache_fin, rt, - rspamd_stat_cache_redis_quark ()); + rspamd_session_add_event (task->s, NULL, rspamd_redis_cache_fin, rt, rspamd_stat_cache_redis_quark ()); event_add (&rt->timeout_event, &tv); rt->has_event = TRUE; } @@ -486,8 +485,7 @@ rspamd_stat_cache_redis_learn (struct rspamd_task *task, if (redisAsyncCommand (rt->redis, rspamd_stat_cache_redis_set, rt, "HSET %s %s %d", rt->ctx->redis_object, h, flag) == REDIS_OK) { - rspamd_session_add_event (task->s, rspamd_redis_cache_fin, rt, - rspamd_stat_cache_redis_quark ()); + rspamd_session_add_event (task->s, NULL, rspamd_redis_cache_fin, rt, rspamd_stat_cache_redis_quark ()); event_add (&rt->timeout_event, &tv); rt->has_event = TRUE; } |