]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix att_xfer reported by woody dickson on the mailing list
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 14 Oct 2010 01:23:55 +0000 (20:23 -0500)
committerBrian West <brian@freeswitch.org>
Thu, 14 Oct 2010 01:23:55 +0000 (20:23 -0500)
src/switch_ivr_async.c

index 7cda47356594999e3c3b2fae7a03b7cae3d72089..b8c8a69204a1d2fe0335ed9ef017f21b187b2dc5 100644 (file)
@@ -1066,11 +1066,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session
                switch_core_session_message_t msg = { 0 };
                char cid_buf[1024] = "";
                switch_caller_profile_t *cp = NULL;
+               uint32_t sanity = 600;
 
                if (!switch_channel_media_ready(channel)) {
                        goto end;
                }
 
+               while(switch_channel_state_change_pending(tchannel)) {
+                       switch_yield(10000);
+                       if (!--sanity) break;
+               }
+
                if (!switch_channel_media_ready(tchannel)) {
                        goto end;
                }