From 9b336755455254e6e2d725e8bfbbe80f02851ebf Mon Sep 17 00:00:00 2001 From: William King Date: Tue, 15 Jan 2013 13:06:44 -0800 Subject: [PATCH] FS-4867: --resolve Prevent possible deadlock due to mutexes locked in opposite order between switch_ivr_dmachine_ping and switch_channel_queue_dtmf --- src/switch_core_io.c | 2 ++ 1 file changed, 2 insertions(+) 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); } }