mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
use this one
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8296 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -177,7 +177,7 @@ void sofia_event_callback(nua_event_t event,
|
||||
switch_channel_t *channel = NULL;
|
||||
sofia_gateway_t *gateway = NULL;
|
||||
|
||||
if (sofia_private && sofia_private != &mod_sofia_globals.destroy_private) {
|
||||
if (sofia_private && sofia_private != &mod_sofia_globals.destroy_private && sofia_private != &mod_sofia_globals.keep_private) {
|
||||
if ((gateway = sofia_private->gateway)) {
|
||||
if (switch_thread_rwlock_tryrdlock(gateway->profile->rwlock) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Profile %s is locked\n", gateway->profile->name);
|
||||
@@ -339,9 +339,15 @@ void sofia_event_callback(nua_event_t event,
|
||||
|
||||
done:
|
||||
|
||||
if ((sofia_private && sofia_private->destroy_nh) || !nua_handle_magic(nh)) {
|
||||
//switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Destroy handle requested.\n");
|
||||
nua_handle_destroy(nh);
|
||||
switch (event) {
|
||||
case nua_i_subscribe:
|
||||
break;
|
||||
default:
|
||||
if (nh && ((sofia_private && sofia_private->destroy_nh) || !nua_handle_magic(nh))) {
|
||||
//switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Destroy handle [%s]\n", nua_event_name(event));
|
||||
nua_handle_destroy(nh);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (gateway) {
|
||||
|
||||
Reference in New Issue
Block a user