res_pjsip: Fix prune_on_boot to remove only contacts for the host.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 15 Aug 2017 16:14:20 +0000 (11:14 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 15 Aug 2017 16:22:54 +0000 (11:22 -0500)
commit9e2b2a9837bc25adfc4a6d760a8ffa7bb4d379d9
tree8577374436a54339429c6ce0b907d948ce273f8d
parent15fbcc74d8fd1b3655f4c34a280fe76665bd0c5c
res_pjsip: Fix prune_on_boot to remove only contacts for the host.

* Check that the contact's reg_server matches the host's name before
deleting any prune_on_boot contacts.  We don't want to delete reliable
transport contacts made with other servers if the ps_contacts database
table is shared with other servers.

Thanks to Ross Beer for pointing out that the original prune logic would
delete reliable transport contacts from other servers.

ASTERISK-27147

Change-Id: I8e439d0d1c266ffdfd7b73d1e5e466180a689bd0
res/res_pjsip/location.c