aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/learn_cache
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-24 13:19:53 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-24 13:19:53 +0000
commitccbc89bc154ee1dd316b315feb4c6ae6a3fab66a (patch)
tree39fb25e9a8691e605336a2bec6e7a8cd3d3685bb /src/libstat/learn_cache
parent16ff3e3d0077ff0ab95108f4287d262a57eb109d (diff)
downloadrspamd-ccbc89bc154ee1dd316b315feb4c6ae6a3fab66a.tar.gz
rspamd-ccbc89bc154ee1dd316b315feb4c6ae6a3fab66a.zip
[Minor] Do not use item in classifiers as it causes issues
Issue: #2636
Diffstat (limited to 'src/libstat/learn_cache')
-rw-r--r--src/libstat/learn_cache/redis_cache.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/libstat/learn_cache/redis_cache.c b/src/libstat/learn_cache/redis_cache.c
index 87a5527b9..6a0aa1da7 100644
--- a/src/libstat/learn_cache/redis_cache.c
+++ b/src/libstat/learn_cache/redis_cache.c
@@ -44,7 +44,6 @@ struct rspamd_redis_cache_ctx {
struct rspamd_redis_cache_runtime {
struct rspamd_redis_cache_ctx *ctx;
struct rspamd_task *task;
- struct rspamd_symcache_item *item;
struct upstream *selected;
struct event timeout_event;
redisAsyncContext *redis;
@@ -171,9 +170,6 @@ rspamd_stat_cache_redis_get (redisAsyncContext *c, gpointer r, gpointer priv)
}
if (rt->has_event) {
- if (rt->item) {
- rspamd_symcache_item_async_dec_check (task, rt->item, M);
- }
rspamd_session_remove_event (task->s, rspamd_redis_cache_fin, rt);
}
}
@@ -196,9 +192,6 @@ rspamd_stat_cache_redis_set (redisAsyncContext *c, gpointer r, gpointer priv)
}
if (rt->has_event) {
- if (rt->item) {
- rspamd_symcache_item_async_dec_check (task, rt->item, M);
- }
rspamd_session_remove_event (task->s, rspamd_redis_cache_fin, rt);
}
}
@@ -447,7 +440,6 @@ rspamd_stat_cache_redis_check (struct rspamd_task *task,
rspamd_redis_cache_fin,
rt,
M);
- rt->item = rspamd_symcache_get_cur_item (task);
event_add (&rt->timeout_event, &tv);
rt->has_event = TRUE;
}
@@ -481,7 +473,6 @@ rspamd_stat_cache_redis_learn (struct rspamd_task *task,
rt->ctx->redis_object, h, flag) == REDIS_OK) {
rspamd_session_add_event (task->s,
rspamd_redis_cache_fin, rt, M);
- rt->item = rspamd_symcache_get_cur_item (task);
event_add (&rt->timeout_event, &tv);
rt->has_event = TRUE;
}