<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11060">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
George Joseph: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_config_wizard: Don't crash if misconfigured<br><br>If both send_registrations and send_auth are both set to yes,<br>outbound_auth/username must be set or we crash.<br><br>ASTERISK-27992 #close<br><br>Change-Id: I6418d56de1ae53f80393b314c2584048fbf7f11d<br>---<br>M res/res_pjsip_config_wizard.c<br>1 file changed, 6 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_config_wizard.c b/res/res_pjsip_config_wizard.c</span><br><span>index d487c4d..0bdedd5 100644</span><br><span>--- a/res/res_pjsip_config_wizard.c</span><br><span>+++ b/res/res_pjsip_config_wizard.c</span><br><span>@@ -912,8 +912,12 @@</span><br><span> client_uri_pattern = "sip:${USERNAME}@${REMOTE_HOST}";</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if(is_variable_true(wizvars, "sends_auth")) {</span><br><span style="color: hsl(0, 100%, 40%);">- username = ast_variable_find_last_in_list(wizvars, "outbound_auth/username");</span><br><span style="color: hsl(120, 100%, 40%);">+ if (is_variable_true(wizvars, "sends_auth")) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!(username = ast_variable_find_last_in_list(wizvars, "outbound_auth/username"))) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "Wizard '%s' must have 'outbound_auth/username' if it sends"</span><br><span style="color: hsl(120, 100%, 40%);">+ " authentication.\n", id);</span><br><span style="color: hsl(120, 100%, 40%);">+ return -1;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> } else {</span><br><span> username = id;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11060">change 11060</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/+/11060"/><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: I6418d56de1ae53f80393b314c2584048fbf7f11d </div>
<div style="display:none"> Gerrit-Change-Number: 11060 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>