提交 2d231cdf authored 作者: Chris Rienzo's avatar Chris Rienzo 提交者: Mike Jerris

FS-11823 [core] clear out event queue when destroying session

上级 20e370aa
...@@ -1580,6 +1580,17 @@ SWITCH_DECLARE(void) switch_core_session_perform_destroy(switch_core_session_t * ...@@ -1580,6 +1580,17 @@ SWITCH_DECLARE(void) switch_core_session_perform_destroy(switch_core_session_t *
} }
} }
if ((*session)->event_queue) {
switch_status_t status;
void *pop;
while ((status = (switch_status_t) switch_queue_trypop((*session)->event_queue, &pop)) == SWITCH_STATUS_SUCCESS) {
if (pop) {
switch_event_t *event = (switch_event_t *) pop;
switch_event_destroy(&event);
}
}
}
pool = (*session)->pool; pool = (*session)->pool;
//#ifndef NDEBUG //#ifndef NDEBUG
//memset(*session, 0, sizeof(switch_core_session_t)); //memset(*session, 0, sizeof(switch_core_session_t));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论