From: Anthony Minessale Date: Mon, 27 Jun 2011 15:01:06 +0000 (-0500) Subject: FS-3373 --resolve X-Git-Tag: v1.2-rc1~108^2^2~130 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dfc30b2e6751b5a97d9b59cab5d9e0b94ebcd3b4;p=thirdparty%2Ffreeswitch.git FS-3373 --resolve --- diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 92eb97ef12..6c1202a4ed 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -151,7 +151,15 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session, */ if (!switch_channel_media_ready(channel)) { - switch_yield(ms * 1000); + + for (elapsed=0; elapsed<(ms/20); elapsed++) { + if (switch_channel_test_flag(channel, CF_BREAK)) { + switch_channel_clear_flag(channel, CF_BREAK); + return SWITCH_STATUS_BREAK; + } + + switch_yield(20 * 1000); + } return SWITCH_STATUS_SUCCESS; }