do not destroy conference if ghost(s) are present, add ghost count check before setting flag

This commit is contained in:
John Briscoe 2016-07-26 13:18:41 -07:00
parent 2c86910092
commit 3227b02194
1 changed files with 1 additions and 1 deletions

View File

@ -2250,7 +2250,7 @@ SWITCH_STANDARD_APP(conference_function)
if (conference) { if (conference) {
switch_mutex_lock(conference->mutex); switch_mutex_lock(conference->mutex);
if (conference_utils_test_flag(conference, CFLAG_DYNAMIC) && conference->count == 0) { if (conference_utils_test_flag(conference, CFLAG_DYNAMIC) && conference->count == 0 && conference->count_ghosts == 0) {
conference_utils_set_flag_locked(conference, CFLAG_DESTRUCT); conference_utils_set_flag_locked(conference, CFLAG_DESTRUCT);
} }
switch_mutex_unlock(conference->mutex); switch_mutex_unlock(conference->mutex);