]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_registrar: lock transport monitor when setting 'removing' flag
authorKevin Harwell <kharwell@digium.com>
Thu, 31 Jan 2019 19:29:05 +0000 (13:29 -0600)
committerJoshua C. Colp <jcolp@digium.com>
Fri, 8 Feb 2019 15:53:01 +0000 (09:53 -0600)
commit933a7ac26290ed2654c343a76b56dc10837bc455
tree067db58d542156717b2c227d0f3c0bb506716123
parent638e336137089a73a04b0bb8ddbecf7200296aff
res_pjsip_registrar: lock transport monitor when setting 'removing' flag

A previous patch attempt to mitigate blocked threads on transport shutdown for
a given contact. It was thought that a second lock could be avoided by checking
the 'removing' flag on the transport monitor twice (once before and once after
the normal named aor locking). However as with usual threading issues if the
timing was right the original problem still occured.

This patch adds locking around the first 'removing' flag check and set, thus
nullifying the secondary check, so it was removed.

ASTERISK-28213

Change-Id: Iaa8e36e5311789549b76d8de42dfcea96013b2ed
(cherry picked from commit 3974633c00fa81573065e415f61f44be2b032f2a)
res/res_pjsip_registrar.c