]> 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)
committerKevin Harwell <kharwell@digium.com>
Thu, 7 Feb 2019 20:28:20 +0000 (14:28 -0600)
commit3974633c00fa81573065e415f61f44be2b032f2a
tree8fdbc1f0a31c03dda94e33420ef9c79b60e520c8
parent762f40fca01ff7ef6654de703d50416f60432bb0
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
res/res_pjsip_registrar.c