From f1102b9a5e4e45434fb6e581b40f06d8ef39c911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bri=C3=A8re?= Date: Sun, 29 Sep 2019 00:38:15 -0400 Subject: Fix "REFER declined" deadlock This occurs when the user declines an incoming call transfer request, due to the following path: - recvd_refer_permission() acquires a read lock over lines_mtx - move_releasing_lines_to_background() is called - A write lock over lines_mtx is acquired --- src/phone.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/phone.cpp b/src/phone.cpp index 401abb1..2718c82 100644 --- a/src/phone.cpp +++ b/src/phone.cpp @@ -1871,7 +1871,7 @@ void t_phone::recvd_refer_permission(bool permission) { t_phone_user *pu = incoming_refer_data->get_phone_user(); t_user *user_config = pu->get_user_profile(); - t_rwmutex_reader x(lines_mtx); + t_rwmutex_future_writer x(lines_mtx); lines[i]->recvd_refer_permission(permission, r); if (!permission) { -- cgit v1.2.3