aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends/redis_backend.c
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/backends/redis_backend.c
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/backends/redis_backend.c')
-rw-r--r--src/libstat/backends/redis_backend.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c
index 20144a7ec..00441a7a6 100644
--- a/src/libstat/backends/redis_backend.c
+++ b/src/libstat/backends/redis_backend.c
@@ -69,7 +69,6 @@ enum rspamd_redis_connection_state {
struct redis_stat_runtime {
struct redis_stat_ctx *ctx;
struct rspamd_task *task;
- struct rspamd_symcache_item *item;
struct upstream *selected;
struct event timeout_event;
GArray *results;
@@ -1231,10 +1230,6 @@ rspamd_redis_processed (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_fin, rt);
}
}
@@ -1267,10 +1262,6 @@ rspamd_redis_learned (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_fin_learn, rt);
}
}
@@ -1606,7 +1597,6 @@ rspamd_redis_process_tokens (struct rspamd_task *task,
rt->redis_object_expanded, learned_key) == REDIS_OK) {
rspamd_session_add_event (task->s, rspamd_redis_fin, rt, M);
- rt->item = rspamd_symcache_get_cur_item (task);
rt->has_event = TRUE;
if (rspamd_event_pending (&rt->timeout_event, EV_TIMEOUT)) {
@@ -1817,7 +1807,6 @@ rspamd_redis_learn_tokens (struct rspamd_task *task, GPtrArray *tokens,
}
rspamd_session_add_event (task->s, rspamd_redis_fin_learn, rt, M);
- rt->item = rspamd_symcache_get_cur_item (task);
rt->has_event = TRUE;
/* Set timeout */