From ebdab14c23d4b342adef7974b943f79d24e39a7f Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sun, 30 Dec 2007 23:25:45 +0000 Subject: [PATCH] avoid deadlock git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7033 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia_presence.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 69e2f2eb08..9bde6d33f0 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -1081,13 +1081,14 @@ void sofia_presence_handle_sip_i_subscribe(int status, sofia_glue_execute_sql(profile, SWITCH_FALSE, sql, NULL); free(sql); - switch_mutex_unlock(profile->ireg_mutex); sstr = switch_mprintf("active;expires=%ld", exp_raw); if (status < 200) { switch_core_hash_insert(profile->sub_hash, call_id, nh); } } + switch_mutex_unlock(profile->ireg_mutex); + if (status < 200) { nua_respond(nh, SIP_202_ACCEPTED, NUTAG_WITH_THIS(nua),