From 21ad823ba038f28a58f0f660cc7ebe902dd459b8 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:07:00 -0400 Subject: Fix "INVITE with Replaces header" deadlock This occurs on reception of an INVITE with a Replaces header, due to the following path: - recvd_invite() acquires a read lock on lines_mtx - recvd_initial_invite() 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 8de3834..a609bef 100644 --- a/src/phone.cpp +++ b/src/phone.cpp @@ -905,7 +905,7 @@ void t_phone::post_process_response(t_response *r, t_tuid tuid, t_tid tid) { } void t_phone::recvd_invite(t_request *r, t_tid tid) { - t_rwmutex_reader x(lines_mtx); + t_rwmutex_future_writer x(lines_mtx); // Check if this INVITE is a retransmission. // Once the TU sent a 2XX repsonse on an INVITE it has to deal -- cgit v1.2.3