aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-12-04 15:18:50 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-12-04 15:18:50 +0000
commit9f754e6c7738f2d0b136c07bf4ac8060888cb3b4 (patch)
tree6fa9aa990b876942656a8963f950ba7817cfab5a /src
parent7a719d343eea81b0b8cbb8b24e7908b80d1f9a59 (diff)
downloadrspamd-9f754e6c7738f2d0b136c07bf4ac8060888cb3b4.tar.gz
rspamd-9f754e6c7738f2d0b136c07bf4ac8060888cb3b4.zip
[Project] Temporary fixes to start new bayes logic debug
Diffstat (limited to 'src')
-rw-r--r--src/libstat/backends/redis_backend.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c
index 9263f479e..57cf059d8 100644
--- a/src/libstat/backends/redis_backend.c
+++ b/src/libstat/backends/redis_backend.c
@@ -1248,12 +1248,14 @@ rspamd_redis_init(struct rspamd_stat_ctx *ctx,
st_elt = g_malloc0(sizeof(*st_elt));
st_elt->event_loop = ctx->event_loop;
st_elt->ctx = backend;
+#if 0
backend->stat_elt = rspamd_stat_ctx_register_async(
rspamd_redis_async_stat_cb,
rspamd_redis_async_stat_fin,
st_elt,
REDIS_STAT_TIMEOUT);
st_elt->async = backend->stat_elt;
+#endif
return (gpointer) backend;
}
@@ -1284,6 +1286,7 @@ rspamd_redis_runtime(struct rspamd_task *task,
rt->task = task;
rt->ctx = ctx;
rt->redis_object_expanded = object_expanded;
+ rt->stcf = stcf;
rspamd_mempool_add_destructor(task->task_pool, rspamd_redis_fin, rt);
@@ -1382,6 +1385,7 @@ rspamd_redis_process_tokens(struct rspamd_task *task,
gint err_idx = lua_gettop(L);
/* Function arguments */
+ lua_rawgeti(L, LUA_REGISTRYINDEX, rt->ctx->cbref_classify);
rspamd_lua_task_push(L, task);
lua_pushstring(L, rt->redis_object_expanded);
lua_pushinteger(L, id);