aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_dns.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-08-22 21:41:48 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-08-22 21:41:48 +0400
commitb90267a71cc8cdc8b38675322ef9fa7a9cb5468c (patch)
tree3bff8af523d19ec9cff93134b067fc404795000d /src/lua/lua_dns.c
parented224e6a3530f54b5993e39066a8397d54e9517e (diff)
downloadrspamd-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_dns.c')
-rw-r--r--src/lua/lua_dns.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/lua/lua_dns.c b/src/lua/lua_dns.c
index b31cac60a..48b0b218f 100644
--- a/src/lua/lua_dns.c
+++ b/src/lua/lua_dns.c
@@ -71,12 +71,6 @@ lua_dns_callback (struct rspamd_dns_reply *reply, gpointer arg)
struct rspamd_dns_resolver **presolver;
union rspamd_reply_element *elt;
GList *cur;
- gboolean need_unlock = FALSE;
-
- /* Avoid LOR here as mutex can be acquired before in lua_call */
- if (g_mutex_trylock (lua_mtx)) {
- need_unlock = TRUE;
- }
lua_rawgeti (cd->L, LUA_REGISTRYINDEX, cd->cbref);
presolver = lua_newuserdata (cd->L, sizeof (gpointer));
@@ -140,10 +134,6 @@ lua_dns_callback (struct rspamd_dns_reply *reply, gpointer arg)
/* Unref function */
luaL_unref (cd->L, LUA_REGISTRYINDEX, cd->cbref);
-
- if (need_unlock) {
- g_mutex_unlock (lua_mtx);
- }
}
static int