mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-20 19:21:53 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10244 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -170,6 +170,7 @@ void sofia_event_callback(nua_event_t event,
|
||||
switch_core_session_t *session = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
sofia_gateway_t *gateway = NULL;
|
||||
int locked = 0;
|
||||
|
||||
if (sofia_private && sofia_private != &mod_sofia_globals.destroy_private && sofia_private != &mod_sofia_globals.keep_private) {
|
||||
if ((gateway = sofia_private->gateway)) {
|
||||
@@ -203,12 +204,15 @@ void sofia_event_callback(nua_event_t event,
|
||||
}
|
||||
|
||||
if (session) {
|
||||
switch_mutex_lock(tech_pvt->sofia_mutex);
|
||||
|
||||
if (channel && switch_channel_get_state(channel) >= CS_HANGUP) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel is already hungup.\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (tech_pvt) {
|
||||
switch_mutex_lock(tech_pvt->sofia_mutex);
|
||||
locked = 1;
|
||||
}
|
||||
} else if (sofia_private && sofia_private->is_call) {
|
||||
sofia_private->destroy_me = 22;
|
||||
}
|
||||
@@ -360,9 +364,12 @@ void sofia_event_callback(nua_event_t event,
|
||||
}
|
||||
|
||||
if (session) {
|
||||
switch_mutex_unlock(tech_pvt->sofia_mutex);
|
||||
switch_core_session_rwunlock(session);
|
||||
}
|
||||
|
||||
if (tech_pvt && locked) {
|
||||
switch_mutex_unlock(tech_pvt->sofia_mutex);
|
||||
}
|
||||
}
|
||||
|
||||
void event_handler(switch_event_t *event)
|
||||
|
||||
Reference in New Issue
Block a user