aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_task.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-25 18:12:10 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-25 18:12:10 +0000
commit64d76774195d1c2225f521f6ee1d40a36947bf97 (patch)
tree9b39356c6efc0aaa144119086ceabee9a1b435af /src/lua/lua_task.c
parent28835c572041145b038bbfd12822595a0083d7e3 (diff)
downloadrspamd-64d76774195d1c2225f521f6ee1d40a36947bf97.tar.gz
rspamd-64d76774195d1c2225f521f6ee1d40a36947bf97.zip
Fix adding values to the cache.
Diffstat (limited to 'src/lua/lua_task.c')
-rw-r--r--src/lua/lua_task.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 2293c55ce..e8814e871 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -1935,7 +1935,7 @@ lua_task_cache_set (lua_State *L)
gint res = RSPAMD_TASK_CACHE_NO_VALUE, param = RSPAMD_TASK_CACHE_NO_VALUE;;
param = lua_tonumber (L, 3);
- if (task && k && param > 0) {
+ if (task && k && param >= 0) {
res = rspamd_task_re_cache_check (task, k);
rspamd_task_re_cache_add (task, k, param);
}