make device state code more accurate

This commit is contained in:
Anthony Minessale committed 2014-05-31 00:30:59 +05:00
1 parent 79a888de2c
commit 495db48f5a
5 files changed
+56 -28

No files matched your search

+5 -2
View File
@@ -355,8 +355,11 @@ void switch_core_state_machine_init(switch_memory_pool_t *pool)
#define STATE_MACRO(__STATE, __STATE_STR) do { \
midstate = state; \
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "(%s) State %s\n", switch_channel_get_name(session->channel), __STATE_STR); \
switch_core_session_refresh_video(session);\
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "(%s) State %s\n", switch_channel_get_name(session->channel), __STATE_STR); \
if (state < CS_HANGUP && switch_channel_get_callstate(session->channel) == CCS_UNHELD) { \
switch_channel_set_callstate(session->channel, CCS_ACTIVE); \
} \
switch_core_session_refresh_video(session); \
if (!driver_state_handler->on_##__STATE || (driver_state_handler->on_##__STATE(session) == SWITCH_STATUS_SUCCESS \
)) { \
while (do_extra_handlers && (application_state_handler = switch_channel_get_state_handler(session->channel, index++)) != 0) { \