From: Travis Cross Date: Mon, 26 May 2014 15:20:38 +0000 (+0000) Subject: mod_fifo: Refactor DTMF exit key matching X-Git-Tag: v1.4.5~2^2~14^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7920630c8f5b3ad55bf867093ffb53cc6ec41cb6;p=thirdparty%2Ffreeswitch.git mod_fifo: Refactor DTMF exit key matching --- diff --git a/src/mod/applications/mod_fifo/mod_fifo.c b/src/mod/applications/mod_fifo/mod_fifo.c index fdd68441d3..8f78c85711 100644 --- a/src/mod/applications/mod_fifo/mod_fifo.c +++ b/src/mod/applications/mod_fifo/mod_fifo.c @@ -470,10 +470,8 @@ static switch_status_t on_dtmf(switch_core_session_t *session, void *input, swit 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; - } else if (!consumer_exit_key && dtmf->digit == '*') { + if (!consumer_exit_key) consumer_exit_key = "*"; + if (dtmf->digit == *consumer_exit_key) { switch_channel_hangup(bchan, SWITCH_CAUSE_NORMAL_CLEARING); return SWITCH_STATUS_BREAK; } else if (dtmf->digit == '0') {