提交 514f4802 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-4960 --resolve

上级 22efebc3
...@@ -1186,9 +1186,17 @@ SWITCH_DECLARE(uint32_t) switch_core_session_flush_private_events(switch_core_se ...@@ -1186,9 +1186,17 @@ SWITCH_DECLARE(uint32_t) switch_core_session_flush_private_events(switch_core_se
if (session->private_event_queue) { if (session->private_event_queue) {
while ((status = (switch_status_t) switch_queue_trypop(session->private_event_queue_pri, &pop)) == SWITCH_STATUS_SUCCESS) { while ((status = (switch_status_t) switch_queue_trypop(session->private_event_queue_pri, &pop)) == SWITCH_STATUS_SUCCESS) {
if (pop) {
switch_event_t *event = (switch_event_t *) pop;
switch_event_destroy(&event);
}
x++; x++;
} }
while ((status = (switch_status_t) switch_queue_trypop(session->private_event_queue, &pop)) == SWITCH_STATUS_SUCCESS) { while ((status = (switch_status_t) switch_queue_trypop(session->private_event_queue, &pop)) == SWITCH_STATUS_SUCCESS) {
if (pop) {
switch_event_t *event = (switch_event_t *) pop;
switch_event_destroy(&event);
}
x++; x++;
} }
check_media(session); check_media(session);
...@@ -1320,6 +1328,9 @@ SWITCH_DECLARE(void) switch_core_session_perform_destroy(switch_core_session_t * ...@@ -1320,6 +1328,9 @@ SWITCH_DECLARE(void) switch_core_session_perform_destroy(switch_core_session_t *
switch_endpoint_interface_t *endpoint_interface = (*session)->endpoint_interface; switch_endpoint_interface_t *endpoint_interface = (*session)->endpoint_interface;
int i; int i;
switch_core_session_flush_private_events(*session);
if (switch_core_session_running(*session) && !switch_test_flag((*session), SSF_DESTROYABLE)) { if (switch_core_session_running(*session) && !switch_test_flag((*session), SSF_DESTROYABLE)) {
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, switch_core_session_get_uuid(*session), SWITCH_LOG_ERROR, switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, switch_core_session_get_uuid(*session), SWITCH_LOG_ERROR,
"Cowardly ignoring an attempt to call destroy on a running session.\n"); "Cowardly ignoring an attempt to call destroy on a running session.\n");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论