From: Anthony Minessale Date: Thu, 14 Oct 2010 01:23:55 +0000 (-0500) Subject: fix att_xfer reported by woody dickson on the mailing list X-Git-Tag: v1.2-rc1~265^2~11^2~192 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0559cc50da3dd8e7aa74eb6276e732c08d6cf8b9;p=thirdparty%2Ffreeswitch.git fix att_xfer reported by woody dickson on the mailing list --- diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index 7cda473565..b8c8a69204 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -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; }