提交 1f52fe1e authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7618 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 d6111c77
......@@ -779,6 +779,7 @@ SWITCH_DECLARE(uint32_t) switch_core_session_private_event_count(_In_ switch_cor
*/
SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_private_event(_In_ switch_core_session_t *session, _Out_ switch_event_t **event);
SWITCH_DECLARE(uint32_t) switch_core_session_flush_private_events(switch_core_session_t *session);
/*!
\brief Read a frame from a session
......
......@@ -268,7 +268,7 @@ SWITCH_STANDARD_APP(fifo_function)
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "push");
switch_event_fire(&event);
}
switch_ivr_park(session, NULL);
if (switch_channel_ready(channel)) {
......@@ -393,6 +393,7 @@ SWITCH_STANDARD_APP(fifo_function)
if (switch_channel_test_flag(other_channel, CF_TAGGED)) {
switch_channel_clear_flag(other_channel, CF_CONTROLLED);
switch_core_session_flush_private_events(other_session);
switch_channel_stop_broadcast(other_channel);
switch_core_session_kill_channel(other_session, SWITCH_SIG_BREAK);
while (switch_channel_test_flag(other_channel, CF_TAGGED)) {
......
......@@ -563,6 +563,21 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_private_event(switch
return status;
}
SWITCH_DECLARE(uint32_t) switch_core_session_flush_private_events(switch_core_session_t *session)
{
switch_status_t status = SWITCH_STATUS_FALSE;
int x = 0;
void *pop;
if (session->private_event_queue) {
while ((status = (switch_status_t) switch_queue_trypop(session->private_event_queue, &pop)) == SWITCH_STATUS_SUCCESS) {
x++;
}
}
return x;
}
SWITCH_DECLARE(void) switch_core_session_reset(switch_core_session_t *session, switch_bool_t flush_dtmf)
{
switch_channel_t *channel = switch_core_session_get_channel(session);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论