]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
check for signalling in sleep app on channels without media
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 13 Nov 2012 18:30:21 +0000 (12:30 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 13 Nov 2012 18:30:25 +0000 (12:30 -0600)
src/switch_ivr.c

index eb8d4ab9e6f8f6e07c6a87020287901149d95988..18329714aaa202f779513109371d2e0373fc4d77 100644 (file)
@@ -153,7 +153,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session,
 
        if (!switch_channel_media_ready(channel)) {
                
-               for (elapsed=0; elapsed<(ms/20); elapsed++) {
+               for (elapsed=0; switch_channel_up(channel) && elapsed<(ms/20); elapsed++) {
                        if (switch_channel_test_flag(channel, CF_BREAK)) {
                                switch_channel_clear_flag(channel, CF_BREAK);
                                return SWITCH_STATUS_BREAK;