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/lua/lua_config.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/lua/lua_config.c')
-rw-r--r-- | src/lua/lua_config.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c index 217bfc761..e2edf6a44 100644 --- a/src/lua/lua_config.c +++ b/src/lua/lua_config.c @@ -336,7 +336,6 @@ lua_config_function_callback (struct worker_task *task, GList *args, void *user_ GList *cur; gboolean res = FALSE; - g_mutex_lock (lua_mtx); if (cd->cb_is_ref) { lua_rawgeti (cd->L, LUA_REGISTRYINDEX, cd->callback.ref); } @@ -366,7 +365,6 @@ lua_config_function_callback (struct worker_task *task, GList *args, void *user_ } lua_pop (cd->L, 1); } - g_mutex_unlock (lua_mtx); return res; } @@ -459,7 +457,6 @@ lua_call_post_filters (struct worker_task *task) struct worker_task **ptask; GList *cur; - g_mutex_lock (lua_mtx); cur = task->cfg->post_filters; while (cur) { cd = cur->data; @@ -479,7 +476,6 @@ lua_call_post_filters (struct worker_task *task) } cur = g_list_next (cur); } - g_mutex_unlock (lua_mtx); } static gint @@ -514,7 +510,6 @@ lua_call_pre_filters (struct worker_task *task) struct worker_task **ptask; GList *cur; - g_mutex_lock (lua_mtx); cur = task->cfg->pre_filters; while (cur) { cd = cur->data; @@ -534,7 +529,6 @@ lua_call_pre_filters (struct worker_task *task) } cur = g_list_next (cur); } - g_mutex_unlock (lua_mtx); } static gint @@ -660,7 +654,6 @@ lua_metric_symbol_callback (struct worker_task *task, gpointer ud) struct lua_callback_data *cd = ud; struct worker_task **ptask; - g_mutex_lock (lua_mtx); if (cd->cb_is_ref) { lua_rawgeti (cd->L, LUA_REGISTRYINDEX, cd->callback.ref); } @@ -675,7 +668,6 @@ lua_metric_symbol_callback (struct worker_task *task, gpointer ud) msg_info ("call to %s failed: %s", cd->cb_is_ref ? "local function" : cd->callback.name, lua_tostring (cd->L, -1)); } - g_mutex_unlock (lua_mtx); } static gint |