<p>Richard Mudgett has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6225">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip: Fix prune_on_boot to remove only contacts for the host.<br><br>* Check that the contact's reg_server matches the host's name before<br>deleting any prune_on_boot contacts.  We don't want to delete reliable<br>transport contacts made with other servers if the ps_contacts database<br>table is shared with other servers.<br><br>Thanks to Ross Beer for pointing out that the original prune logic would<br>delete reliable transport contacts from other servers.<br><br>ASTERISK-27147<br><br>Change-Id: I8e439d0d1c266ffdfd7b73d1e5e466180a689bd0<br>---<br>M res/res_pjsip/location.c<br>1 file changed, 4 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/25/6225/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c<br>index 09da2fc..ddde5c4 100644<br>--- a/res/res_pjsip/location.c<br>+++ b/res/res_pjsip/location.c<br>@@ -467,7 +467,10 @@<br> {<br>      struct ast_sip_contact *contact = obj;<br> <br>-    if (contact->prune_on_boot) {<br>+     if (contact->prune_on_boot<br>+                && !strcmp(contact->reg_server, ast_config_AST_SYSTEM_NAME ?: "")) {<br>+            ast_verb(3, "Removed contact '%s' from AOR '%s' due to system boot\n",<br>+                     contact->uri, contact->aor);<br>            ast_sip_location_delete_contact(contact);<br>     }<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6225">change 6225</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6225"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I8e439d0d1c266ffdfd7b73d1e5e466180a689bd0 </div>
<div style="display:none"> Gerrit-Change-Number: 6225 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>