]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix cpu race on inbound call to pa when no ring file is set
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 27 Aug 2008 15:48:03 +0000 (15:48 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 27 Aug 2008 15:48:03 +0000 (15:48 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9372 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_portaudio/mod_portaudio.c

index ebd0bd8e5c791502573420e1c888191b54c78ecf..6ac2850daef36241f9c0ca66d4c051376b56f347 100644 (file)
@@ -266,6 +266,8 @@ static switch_status_t channel_on_init(switch_core_session_t *session)
                                if (globals.ring_stream) {
                                        WriteAudioStream(globals.ring_stream, abuf, (long) olen, &globals.timer);
                                }
+                       } else {
+                               switch_yield(10000);
                        }
                }
                switch_clear_flag_locked((&globals), GFLAG_RING);