From 8c188005a09d5b44be1207c7cdb9f827df62fbc0 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 19 Jun 2007 16:29:59 +0000 Subject: [PATCH] wtf was that? git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5390 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index a4eab44c41..04c661d98c 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -227,6 +227,8 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session) switch_core_session_rwunlock(a_session); } + switch_mutex_lock(tech_pvt->profile->flag_mutex); + if (tech_pvt->nh) { if (!switch_test_flag(tech_pvt, TFLAG_BYE)) { if (switch_test_flag(tech_pvt, TFLAG_ANS)) { @@ -241,13 +243,11 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session) nua_cancel(tech_pvt->nh, TAG_END()); } } - switch_set_flag_locked(tech_pvt, TFLAG_BYE); + switch_set_flag(tech_pvt, TFLAG_BYE); } } - switch_clear_flag_locked(tech_pvt, TFLAG_IO); - - + switch_clear_flag(tech_pvt, TFLAG_IO); tech_pvt->profile->inuse--; switch_mutex_unlock(tech_pvt->profile->flag_mutex);