aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/learn_cache/redis_cache.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-14 14:07:30 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-14 14:07:30 +0100
commit203de2ba032b85924dd01076f72d21752a7a4f29 (patch)
treee5f33827f36c60feb3d168999c76700960497574 /src/libstat/learn_cache/redis_cache.c
parentc7cf4d68dbf5adb173f5a7391833cc9df8e2b4dd (diff)
downloadrspamd-203de2ba032b85924dd01076f72d21752a7a4f29.tar.gz
rspamd-203de2ba032b85924dd01076f72d21752a7a4f29.zip
[Fix] Fix autolearning errors and redis cache
Diffstat (limited to 'src/libstat/learn_cache/redis_cache.c')
-rw-r--r--src/libstat/learn_cache/redis_cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstat/learn_cache/redis_cache.c b/src/libstat/learn_cache/redis_cache.c
index cd92bfac4..21f35a563 100644
--- a/src/libstat/learn_cache/redis_cache.c
+++ b/src/libstat/learn_cache/redis_cache.c
@@ -134,8 +134,7 @@ rspamd_stat_cache_redis_get (redisAsyncContext *c, gpointer r, gpointer priv)
if ((val > 0 && (task->flags & RSPAMD_TASK_FLAG_LEARN_SPAM)) ||
(val < 0 && (task->flags & RSPAMD_TASK_FLAG_LEARN_HAM))) {
/* Already learned */
- g_set_error (&task->err, rspamd_stat_quark (), 404,
- "<%s> has been already "
+ msg_info_task ("<%s> has been already "
"learned as %s, ignore it", task->message_id,
(task->flags & RSPAMD_TASK_FLAG_LEARN_SPAM) ? "spam" : "ham");
task->flags |= RSPAMD_TASK_FLAG_ALREADY_LEARNED;
@@ -144,6 +143,7 @@ rspamd_stat_cache_redis_get (redisAsyncContext *c, gpointer r, gpointer priv)
/* Unlearn flag */
task->flags |= RSPAMD_TASK_FLAG_UNLEARN;
}
+
rspamd_upstream_ok (rt->selected);
}
else {