From: William King Date: Tue, 15 Jan 2013 21:06:44 +0000 (-0800) Subject: FS-4867: --resolve Prevent possible deadlock due to mutexes locked in opposite order... X-Git-Tag: v1.3.13~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b336755455254e6e2d725e8bfbbe80f02851ebf;p=thirdparty%2Ffreeswitch.git FS-4867: --resolve Prevent possible deadlock due to mutexes locked in opposite order between switch_ivr_dmachine_ping and switch_channel_queue_dtmf --- diff --git a/src/switch_core_io.c b/src/switch_core_io.c index 72345d6a04..c104ea9c6a 100644 --- a/src/switch_core_io.c +++ b/src/switch_core_io.c @@ -151,7 +151,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi for(i = 0; i < 2; i++) { if (session->dmachine[i] && !switch_channel_test_flag(session->channel, CF_BROADCAST)) { + switch_mutex_lock(session->channel->dtmf_mutex); switch_ivr_dmachine_ping(session->dmachine[i], NULL); + switch_mutex_unlock(session->channel->dtmf_mutex); } }