]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9748 #resolve [Locking contention with mod_shout playing conference moh] %backport=1.6
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 17 Nov 2016 02:08:56 +0000 (20:08 -0600)
committerBrian West <brian@freeswitch.org>
Thu, 17 Nov 2016 02:09:05 +0000 (20:09 -0600)
src/mod/applications/mod_conference/mod_conference.c
src/mod/applications/mod_conference/mod_conference.h
src/mod/formats/mod_shout/mod_shout.c

index cc8baf4119c4d469295bda004af9e3265556fb6b..c7bee4339ecab568d75ea0fa02ef69523950fd20 100644 (file)
@@ -237,6 +237,7 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
                uint32_t conference_energy = 0;
                int nomoh = 0;
                conference_member_t *floor_holder;
+               switch_status_t moh_status = SWITCH_STATUS_SUCCESS;
 
                /* Sync the conference to a single timing source */
                if (switch_core_timer_next(&timer) != SWITCH_STATUS_SUCCESS) {
index 8a03a928e31832d0c0d7bfcbb75dbd7a4c15dd87..22b38e7226b866f9c20dffdd1657745b07ef96cc 100644 (file)
@@ -683,6 +683,7 @@ typedef struct conference_obj {
        int scale_h264_canvas_height;
        int scale_h264_canvas_fps_divisor;
        char *scale_h264_canvas_bandwidth;
+       uint32_t moh_wait;
 } conference_obj_t;
 
 /* Relationship with another member */
index 8372a03b7fb3f16812b2cb43ff65af814e92f44c..f326116a5b1f9c50994bf3b76b14389d776ea780 100644 (file)
@@ -717,7 +717,7 @@ static switch_status_t shout_file_open(switch_file_handle_t *handle, const char
                if (handle->handler) {
                        int sanity = 1000;
 
-                       while(--sanity > 0 && !switch_buffer_inuse(context->audio_buffer)) {
+                       while(--sanity > 0 && !switch_buffer_inuse(context->audio_buffer) && !context->eof && !context->err) {
                                switch_yield(20000);
                        }