use this one

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8296 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-05-07 20:06:46 +00:00
parent a869f867d2
commit 6c17e72694
4 changed files with 48 additions and 11 deletions
+10 -4
View File
@@ -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) {