diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-08-22 21:41:48 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-08-22 21:41:48 +0400 |
commit | b90267a71cc8cdc8b38675322ef9fa7a9cb5468c (patch) | |
tree | 3bff8af523d19ec9cff93134b067fc404795000d /src/worker.c | |
parent | ed224e6a3530f54b5993e39066a8397d54e9517e (diff) | |
download | rspamd-b90267a71cc8cdc8b38675322ef9fa7a9cb5468c.tar.gz rspamd-b90267a71cc8cdc8b38675322ef9fa7a9cb5468c.zip |
* Rework thread pools locking logic to avoid global lua mutex usage.
Fixed several memory leaks with modern glib.
Fixed memory leak in dkim code.
Fixed a problem with static global variables in shared libraries.
Diffstat (limited to 'src/worker.c')
-rw-r--r-- | src/worker.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/worker.c b/src/worker.c index 465104b6e..08fbdda11 100644 --- a/src/worker.c +++ b/src/worker.c @@ -782,6 +782,7 @@ start_worker (struct rspamd_worker *worker) gchar *is_custom_str; struct rspamd_worker_ctx *ctx = worker->ctx; GError *err = NULL; + struct lua_locked_state *nL; #ifdef WITH_PROFILER extern void _start (void), etext (void); @@ -836,7 +837,8 @@ start_worker (struct rspamd_worker *worker) /* Create classify pool */ ctx->classify_pool = NULL; if (ctx->classify_threads > 1) { - ctx->classify_pool = g_thread_pool_new (process_statfiles_threaded, ctx, ctx->classify_threads, TRUE, &err); + nL = init_lua_locked (worker->srv->cfg); + ctx->classify_pool = g_thread_pool_new (process_statfiles_threaded, nL, ctx->classify_threads, TRUE, &err); if (err != NULL) { msg_err ("pool create failed: %s", err->message); ctx->classify_pool = NULL; |