diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-01-17 14:48:24 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-01-17 14:48:24 +0000 |
commit | c2fd943dc8454742cd8be85c05e20adaf4719a2d (patch) | |
tree | fb16d097374ac9e748b8f64049946cd798074d88 /src/libstat/learn_cache | |
parent | 903b60db99a502377bcb4e7f035efcdb801f8941 (diff) | |
download | rspamd-c2fd943dc8454742cd8be85c05e20adaf4719a2d.tar.gz rspamd-c2fd943dc8454742cd8be85c05e20adaf4719a2d.zip |
[Project] Final things on redis cache rework
Diffstat (limited to 'src/libstat/learn_cache')
-rw-r--r-- | src/libstat/learn_cache/redis_cache.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstat/learn_cache/redis_cache.cxx b/src/libstat/learn_cache/redis_cache.cxx index 86a6a35d4..b67df70a2 100644 --- a/src/libstat/learn_cache/redis_cache.cxx +++ b/src/libstat/learn_cache/redis_cache.cxx @@ -223,7 +223,7 @@ rspamd_stat_cache_checked(lua_State *L) auto val = lua_tointeger(L, 3); if ((val > 0 && (task->flags & RSPAMD_TASK_FLAG_LEARN_SPAM)) || - (val < 0 && (task->flags & RSPAMD_TASK_FLAG_LEARN_HAM))) { + (val <= 0 && (task->flags & RSPAMD_TASK_FLAG_LEARN_HAM))) { /* Already learned */ msg_info_task("<%s> has been already " "learned as %s, ignore it", @@ -293,7 +293,7 @@ gint rspamd_stat_cache_redis_learn(struct rspamd_task *task, gint err_idx = lua_gettop(L); /* Function arguments */ - lua_rawgeti(L, LUA_REGISTRYINDEX, ctx->check_ref); + lua_rawgeti(L, LUA_REGISTRYINDEX, ctx->learn_ref); rspamd_lua_task_push(L, task); lua_pushstring(L, h); lua_pushboolean(L, is_spam); |