event socket / ESL improvements

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12228 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2009-02-21 23:19:58 +00:00
1 parent c7d6662d08
commit 99026e02e7
18 files changed
+156 -57

No files matched your search

+2 -2
View File
@@ -680,14 +680,14 @@ SWITCH_DECLARE(uint32_t) switch_core_session_event_count(switch_core_session_t *
return 0;
}
SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_event(switch_core_session_t *session, switch_event_t **event)
SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_event(switch_core_session_t *session, switch_event_t **event, switch_bool_t force)
{
switch_status_t status = SWITCH_STATUS_FALSE;
void *pop;
switch_assert(session != NULL);
if (session->event_queue) {
if (session->event_queue && (force || !switch_channel_test_flag(session->channel, CF_DIVERT_EVENTS))) {
if ((status = (switch_status_t) switch_queue_trypop(session->event_queue, &pop)) == SWITCH_STATUS_SUCCESS) {
*event = (switch_event_t *) pop;
}