<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/16142">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_config_wizard.c: Add port matching support.<br><br>In f8b0c2c9 we added support for port numbers in 'match' statements<br>but neglected to include that support in the PJSIP config wizard.<br><br>The removed code would have also prevented IPv6 addresses from being<br>successfully used in the config wizard as well.<br><br>ASTERISK-29503 #close<br><br>Change-Id: Idd5bbfd48009e7a741757743dbaea68e2835a34d<br>---<br>M res/res_pjsip_config_wizard.c<br>1 file changed, 2 insertions(+), 12 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/42/16142/1</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 e61b7c5..8611be7 100644</span><br><span>--- a/res/res_pjsip_config_wizard.c</span><br><span>+++ b/res/res_pjsip_config_wizard.c</span><br><span>@@ -764,18 +764,8 @@</span><br><span> </span><br><span>       if (!ast_variable_find_last_in_list(vars, "match")) {</span><br><span>              for (host_counter = 0; host_counter < host_count; host_counter++) {</span><br><span style="color: hsl(0, 100%, 40%);">-                  char *rhost = AST_VECTOR_GET(remote_hosts_vector, host_counter);</span><br><span style="color: hsl(0, 100%, 40%);">-                        char host[strlen(rhost) + 1];</span><br><span style="color: hsl(0, 100%, 40%);">-                   char *colon;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-                    /* If there's a :port specified, we have to remove it. */</span><br><span style="color: hsl(0, 100%, 40%);">-                   strcpy(host, rhost); /* Safe */</span><br><span style="color: hsl(0, 100%, 40%);">-                 colon = strchr(host, ':');</span><br><span style="color: hsl(0, 100%, 40%);">-                      if (colon) {</span><br><span style="color: hsl(0, 100%, 40%);">-                            *colon = '\0';</span><br><span style="color: hsl(0, 100%, 40%);">-                  }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-                       variable_list_append_return(&vars, "match", host);</span><br><span style="color: hsl(120, 100%, 40%);">+                      variable_list_append_return(&vars, "match",</span><br><span style="color: hsl(120, 100%, 40%);">+                             AST_VECTOR_GET(remote_hosts_vector, host_counter));</span><br><span>          }</span><br><span>    }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16142">change 16142</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/+/16142"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: Idd5bbfd48009e7a741757743dbaea68e2835a34d </div>
<div style="display:none"> Gerrit-Change-Number: 16142 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean@seanbright.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>