<p>Kevin Harwell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7482">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pjsip_options: dynamic contact's fields not updated on reload<br><br>Dynamic contacts were not being properly updated on reload. As a matter of<br>fact any changes to the AOR that a dynamic contact was associated with were<br>not being applied.<br><br>On reload, this patch makes it so for each dynamic contact, the associated<br>AOR is now retrieved and the AOR's fields are applied to the contact.<br><br>ASTERISK-27467<br><br>Change-Id: I8e3165dc6a745218c1c9db837f77fafa0516985d<br>---<br>M res/res_pjsip/pjsip_options.c<br>1 file changed, 18 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/82/7482/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c<br>index d4ea911..da95341 100644<br>--- a/res/res_pjsip/pjsip_options.c<br>+++ b/res/res_pjsip/pjsip_options.c<br>@@ -1157,7 +1157,24 @@<br> <br> static int qualify_and_schedule_cb_without_aor(void *obj, void *arg, int flags)<br> {<br>- qualify_and_schedule_contact((struct ast_sip_contact *) obj);<br>+ /*<br>+ * These are really dynamic contacts. We need to retrieve the aor associated<br>+ * with the contact since it's possible some of the aor's fields were updated<br>+ * since last load.<br>+ */<br>+ struct ast_sip_contact *contact = obj;<br>+ struct ast_sip_aor *aor = ast_sip_location_retrieve_aor(contact->aor);<br>+<br>+ if (aor) {<br>+ qualify_and_schedule_cb_with_aor(obj, aor, flags);<br>+ ao2_ref(aor, -1);<br>+ } else {<br>+ ast_log(LOG_WARNING, "Unable to locate AOR for contact '%s'. Keeping old "<br>+ "associated settings: frequency=%d, timeout=%f, authenticate=%s\n",<br>+ contact->uri, contact->qualify_frequency, contact->qualify_timeout,<br>+ contact->authenticate_qualify ? "yes" : "no");<br>+ qualify_and_schedule_contact(contact);<br>+ }<br> <br> return 0;<br> }<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7482">change 7482</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/7482"/><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: I8e3165dc6a745218c1c9db837f77fafa0516985d </div>
<div style="display:none"> Gerrit-Change-Number: 7482 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>