mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
add in switch_core_signal_lock/unlock
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7737 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -708,7 +708,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
|
||||
switch_mutex_lock(tech_pvt->flag_mutex);
|
||||
|
||||
|
||||
if (switch_channel_get_state(channel) >= CS_HANGUP || !tech_pvt) {
|
||||
status = SWITCH_STATUS_FALSE;
|
||||
goto end;
|
||||
|
||||
@@ -222,8 +222,8 @@ void sofia_event_callback(nua_event_t event,
|
||||
nua_event_name(event), status, phrase, session ? switch_channel_get_name(channel) : "n/a");
|
||||
}
|
||||
|
||||
if (tech_pvt) {
|
||||
switch_mutex_lock(tech_pvt->flag_mutex);
|
||||
if (session) {
|
||||
switch_core_session_signal_lock(session);
|
||||
}
|
||||
|
||||
if ((profile->pflags & PFLAG_AUTH_ALL) && tech_pvt && tech_pvt->key && sip) {
|
||||
@@ -352,11 +352,8 @@ void sofia_event_callback(nua_event_t event,
|
||||
sofia_reg_release_gateway(gateway);
|
||||
}
|
||||
|
||||
if (tech_pvt) {
|
||||
switch_mutex_unlock(tech_pvt->flag_mutex);
|
||||
}
|
||||
|
||||
if (session) {
|
||||
switch_core_session_signal_unlock(session);
|
||||
switch_core_session_rwunlock(session);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user