From c34ad2c0eceeb44253cc87067dbc8d8d3563cec3 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Mon, 26 May 2014 15:09:20 +0000 Subject: [PATCH] mod_fifo: Avoid getting a var when we won't use it --- src/mod/applications/mod_fifo/mod_fifo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mod/applications/mod_fifo/mod_fifo.c b/src/mod/applications/mod_fifo/mod_fifo.c index 4621f29be1..fdd68441d3 100644 --- a/src/mod/applications/mod_fifo/mod_fifo.c +++ b/src/mod/applications/mod_fifo/mod_fifo.c @@ -468,9 +468,8 @@ static switch_status_t on_dtmf(switch_core_session_t *session, void *input, swit switch_channel_t *bchan = switch_core_session_get_channel(bleg); switch_channel_t *channel = switch_core_session_get_channel(session); - const char *consumer_exit_key = switch_channel_get_variable(channel, "fifo_consumer_exit_key"); - if (switch_channel_test_flag(switch_core_session_get_channel(session), CF_BRIDGE_ORIGINATOR)) { + const char *consumer_exit_key = switch_channel_get_variable(channel, "fifo_consumer_exit_key"); if (consumer_exit_key && dtmf->digit == *consumer_exit_key) { switch_channel_hangup(bchan, SWITCH_CAUSE_NORMAL_CLEARING); return SWITCH_STATUS_BREAK;