]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Restore item when pushing redis result
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 24 Oct 2018 12:41:51 +0000 (13:41 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 24 Oct 2018 12:41:51 +0000 (13:41 +0100)
src/lua/lua_redis.c

index 8d884fab03fd58b6d6850aad70febb74535ff414..a1f62b72db9fc8329e560a9eb1aea433f5c2efef 100644 (file)
@@ -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);