<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14034">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip: Don't set endpoint to unavailable in all cases.<br><br>When an AOR is modified endpoints are updated that reference<br>the AOR so they can start receiving updates and reflect the<br>correct state. If this is the case then we shouldn't change<br>the endpoint to be offline if it does not reference the AOR<br>but instead only when the endpoint is completely updated for<br>all its AORs.<br><br>ASTERISK-28056<br>patches:<br>  pjsip_options-aor.diff submitted by jhord (license 6978)<br><br>Change-Id: I3ee00023be2393113cd4e056599f23f3499ef164<br>---<br>M res/res_pjsip/pjsip_options.c<br>1 file changed, 5 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/34/14034/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c</span><br><span>index c88b1b8..c4fe0b6 100644</span><br><span>--- a/res/res_pjsip/pjsip_options.c</span><br><span>+++ b/res/res_pjsip/pjsip_options.c</span><br><span>@@ -1667,8 +1667,11 @@</span><br><span>             ao2_unlock(task_data.endpoint_state_compositor);</span><br><span> </span><br><span>                 ao2_ref(task_data.endpoint_state_compositor, -1);</span><br><span style="color: hsl(0, 100%, 40%);">-       } else {</span><br><span style="color: hsl(0, 100%, 40%);">-                /* If there is none then they may have referenced an invalid AOR or none at all */</span><br><span style="color: hsl(120, 100%, 40%);">+    } else if (!aor) {</span><br><span style="color: hsl(120, 100%, 40%);">+            /* If no explicit AOR is specified we are updating the endpoint itself, so then set</span><br><span style="color: hsl(120, 100%, 40%);">+            * it to offline if no endpoint compositor exists as they referenced an invalid AOR</span><br><span style="color: hsl(120, 100%, 40%);">+            * or none at all</span><br><span style="color: hsl(120, 100%, 40%);">+              */</span><br><span>          ast_debug(3, "Endpoint '%s' has no AORs feeding it, setting it to offline state as default\n",</span><br><span>                     ast_sorcery_object_get_id(endpoint));</span><br><span>                ast_sip_persistent_endpoint_update_state(ast_sorcery_object_get_id(endpoint),</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14034">change 14034</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/14034"/><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-Change-Id: I3ee00023be2393113cd4e056599f23f3499ef164 </div>
<div style="display:none"> Gerrit-Change-Number: 14034 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>