]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix conference record race
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 11 Dec 2008 23:39:16 +0000 (23:39 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 11 Dec 2008 23:39:16 +0000 (23:39 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10723 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_conference/mod_conference.c

index 8c434a3e40c6cc18cec4bfc9119eeff271205b08..ca4aaea8c4000f264a862a48e4a3551bf014ac37 100644 (file)
@@ -885,6 +885,12 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
        switch_mutex_unlock(globals.hash_mutex);
        
        if (conference->auto_record) {
+               uint32_t sanity = 100;
+
+               while (!conference->members && --sanity) {
+                       switch_yield(100000);
+               }
+
                imember = conference->members;
                if (imember) {
                        switch_channel_t *channel = switch_core_session_get_channel(imember->session);