aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-03 17:37:53 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-03 17:37:53 +0000
commitcdf89b1d3b599cdc1716403dcc93f0ca4f06a247 (patch)
tree1bda580c4adfc748907cfc47f618fab38f76e86c /src/lua
parent45e84668a1c7a7131db53e2b94375cfc98d68556 (diff)
downloadrspamd-cdf89b1d3b599cdc1716403dcc93f0ca4f06a247.tar.gz
rspamd-cdf89b1d3b599cdc1716403dcc93f0ca4f06a247.zip
Fix code for the new cache
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_task.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 69644ba24..c10cfe72b 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -1986,14 +1986,9 @@ static gint
lua_task_cache_get (lua_State *L)
{
struct rspamd_task *task = lua_check_task (L, 1);
- const gchar *k = luaL_checkstring (L, 2);
- gint res = RSPAMD_TASK_CACHE_NO_VALUE;
- if (task && k) {
- res = rspamd_task_re_cache_check (task, k);
- }
-
- lua_pushnumber (L, res);
+ msg_err_task ("this function is deprecated and will return nothing");
+ lua_pushnumber (L, -1);
return 1;
}
@@ -2002,16 +1997,9 @@ static gint
lua_task_cache_set (lua_State *L)
{
struct rspamd_task *task = lua_check_task (L, 1);
- const gchar *k = luaL_checkstring (L, 2);
- gint res = RSPAMD_TASK_CACHE_NO_VALUE, param = RSPAMD_TASK_CACHE_NO_VALUE;;
-
- param = lua_tonumber (L, 3);
- if (task && k && param >= 0) {
- res = rspamd_task_re_cache_check (task, k);
- rspamd_task_re_cache_add (task, k, param);
- }
- lua_pushnumber (L, res);
+ msg_err_task ("this function is deprecated and will return nothing");
+ lua_pushnumber (L, 0);
return 1;
}