add more profile shutdown code to compensate for bug in sofia lib on nua_destroy

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9997 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-10-13 19:26:28 +00:00
parent f6f7f31c05
commit d74b12a167
3 changed files with 22 additions and 1 deletions
+8
View File
@@ -635,6 +635,14 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
su_root_step(profile->s_root, 1000);
}
sofia_clear_pflag_locked(profile, PFLAG_RUNNING);
switch_core_session_hupall_matching_var("sofia_profile_name", profile->name, SWITCH_CAUSE_MANAGER_REQUEST);
while (profile->inuse) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Waiting for %d session(s)\n", profile->inuse);
su_root_step(profile->s_root, 1000);
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write lock %s\n", profile->name);
switch_thread_rwlock_wrlock(profile->rwlock);
sofia_reg_unregister(profile);