]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix sleep to work right on unanswered channels
authorAnthony Minessale <anthony.minessale@gmail.com>
Sun, 28 Jan 2007 03:17:12 +0000 (03:17 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sun, 28 Jan 2007 03:17:12 +0000 (03:17 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4072 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr.c

index 7774042b45485ca064120d16b58b85f25b20c064..6af32747f63fd7a5825e8a021f76f7c09fd6ccc6 100644 (file)
@@ -71,7 +71,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session,
                        break;
                }
 
-               if (switch_channel_test_flag(channel, CF_SERVICE)) {
+               if (switch_channel_test_flag(channel, CF_SERVICE) || 
+            (!switch_channel_test_flag(channel, CF_ANSWERED) && !switch_channel_test_flag(channel, CF_EARLY_MEDIA))) {
                        switch_yield(1000);
                } else {
                        status = switch_core_session_read_frame(session, &read_frame, left, 0);