提交 7bcaaeb5 authored 作者: Mike Jerris's avatar Mike Jerris

FS-9714: [mod_conference] fix crash due to race on closing file handles when…

FS-9714: [mod_conference] fix crash due to race on closing file handles when playing a file to a conference via api command as a conference is shutting down
上级 be2d60ac
...@@ -776,6 +776,8 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob ...@@ -776,6 +776,8 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
} }
} }
switch_mutex_lock(conference->mutex);
/* Close Unused Handles */ /* Close Unused Handles */
if (conference->fnode) { if (conference->fnode) {
conference_file_node_t *fnode, *cur; conference_file_node_t *fnode, *cur;
...@@ -804,6 +806,8 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob ...@@ -804,6 +806,8 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
switch_core_destroy_memory_pool(&pool); switch_core_destroy_memory_pool(&pool);
} }
switch_mutex_unlock(conference->mutex);
/* Wait till everybody is out */ /* Wait till everybody is out */
conference_utils_clear_flag_locked(conference, CFLAG_RUNNING); conference_utils_clear_flag_locked(conference, CFLAG_RUNNING);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write Lock ON\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write Lock ON\n");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论