]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_registrar: blocked threads on reliable transport shutdown take 3
authorKevin Harwell <kharwell@digium.com>
Wed, 20 Feb 2019 17:03:01 +0000 (11:03 -0600)
committerKevin Harwell <kharwell@digium.com>
Wed, 27 Feb 2019 23:02:43 +0000 (17:02 -0600)
commit930a7fe910817d439023cdc8ff2d5ea543779ae2
treef269e05965d8a5c2f4f3d3f0455a1fd3f2fe9a0a
parente0fc66329565bdb9fc99a8205f4969633726b640
res_pjsip_registrar: blocked threads on reliable transport shutdown take 3

When a contact was removed by the registrar it did not always check to see if
the circumstances involved a monitored reliable transport. For instance, if the
'remove_existing' option was set to 'true' then when existing contacts were
removed due to 'max_contacts' being reached, those existing contacts being
removed did not unregister the transport monitor.

Also, it was possible to add more than one monitor on a reliable transport for
a given aor and contact.

This patch makes it so all contact removals done by the registrar also remove
any associated transport monitors if necessary. It also makes it so duplicate
monitors cannot be added for a given transport.

ASTERISK-28213

Change-Id: I94b06f9026ed177d6adfd538317c784a42c1b17a
include/asterisk/res_pjsip.h
res/res_pjsip/pjsip_transport_events.c
res/res_pjsip_registrar.c