From: Vsevolod Stakhov Date: Wed, 24 Oct 2018 12:41:51 +0000 (+0100) Subject: [Minor] Restore item when pushing redis result X-Git-Tag: 1.8.2~148 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3e71deda3402755ff30f21ef98a4da0ff257a31f;p=thirdparty%2Frspamd.git [Minor] Restore item when pushing redis result --- diff --git a/src/lua/lua_redis.c b/src/lua/lua_redis.c index 8d884fab03..a1f62b72db 100644 --- a/src/lua/lua_redis.c +++ b/src/lua/lua_redis.c @@ -366,6 +366,10 @@ lua_redis_push_data (const redisReply *r, struct lua_redis_ctx *ctx, /* Data */ lua_redis_push_reply (cbs.L, r, ctx->flags & LUA_REDIS_TEXTDATA); + if (ud->item) { + rspamd_symbols_cache_set_cur_item (ud->task, ud->item); + } + if (lua_pcall (cbs.L, 2, 0, 0) != 0) { msg_info ("call to callback failed: %s", lua_tostring (cbs.L, -1)); lua_pop (cbs.L, 1);