aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstat/backends/redis_backend.c11
-rw-r--r--src/libstat/learn_cache/redis_cache.c9
2 files changed, 0 insertions, 20 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 */
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;
}