From: Vsevolod Stakhov Date: Wed, 22 Aug 2012 14:19:21 +0000 (+0400) Subject: Fix deadlock in lua HTTP bindings. X-Git-Tag: 0.5.2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed224e6a3530f54b5993e39066a8397d54e9517e;p=thirdparty%2Frspamd.git Fix deadlock in lua HTTP bindings. --- diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c index 8f85ebee11..3fa5da2ab2 100644 --- a/src/lua/lua_http.c +++ b/src/lua/lua_http.c @@ -115,12 +115,12 @@ lua_http_push_error (gint code, struct lua_http_ud *ud) g_list_free (ud->headers); ud->headers = NULL; } - - ud->parser_state = 3; - remove_normal_event (ud->s, lua_http_fin, ud); if (need_unlock) { g_mutex_unlock (lua_mtx); } + ud->parser_state = 3; + remove_normal_event (ud->s, lua_http_fin, ud); + } static void @@ -175,10 +175,11 @@ lua_http_push_reply (f_str_t *in, struct lua_http_ud *ud) ud->headers = NULL; } - remove_normal_event (ud->s, lua_http_fin, ud); if (need_unlock) { g_mutex_unlock (lua_mtx); } + remove_normal_event (ud->s, lua_http_fin, ud); + } /*