summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-04 14:00:34 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-04 14:01:03 +0100
commit640f6eec01ae9fef02b73ba2c1a6363c02bc7772 (patch)
tree1275ad7f0a32b5680fba3bc0e10ca20d63dc02f1 /src
parenteef8d4eabe8c320a16cffc65adb963e0f6cf3461 (diff)
downloadrspamd-640f6eec01ae9fef02b73ba2c1a6363c02bc7772.tar.gz
rspamd-640f6eec01ae9fef02b73ba2c1a6363c02bc7772.zip
[Minor] Always return constant number of results from lua redis
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_redis.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lua/lua_redis.c b/src/lua/lua_redis.c
index 55a85d22d..2e19cc4d4 100644
--- a/src/lua/lua_redis.c
+++ b/src/lua/lua_redis.c
@@ -634,8 +634,9 @@ lua_redis_make_request (lua_State *L)
REF_RELEASE (ctx);
lua_pushboolean (L, FALSE);
+ lua_pushnil (L);
- return 1;
+ return 2;
}
redisAsyncSetConnectCallback (ud->ctx, lua_redis_connect_cb);
@@ -686,11 +687,12 @@ lua_redis_make_request (lua_State *L)
pctx = lua_newuserdata (L, sizeof (ctx));
*pctx = ctx;
rspamd_lua_setclass (L, "rspamd{redis}", -1);
-
- return 2;
+ }
+ else {
+ lua_pushnil (L);
}
- return 1;
+ return 2;
}
/***