[Asterisk-code-review] res_pjsip_config_wizard.c: Add port matching support. (asterisk[16])
Sean Bright
asteriskteam at digium.com
Wed Jun 30 09:54:09 CDT 2021
Sean Bright has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/16142 )
Change subject: res_pjsip_config_wizard.c: Add port matching support.
......................................................................
res_pjsip_config_wizard.c: Add port matching support.
In f8b0c2c9 we added support for port numbers in 'match' statements
but neglected to include that support in the PJSIP config wizard.
The removed code would have also prevented IPv6 addresses from being
successfully used in the config wizard as well.
ASTERISK-29503 #close
Change-Id: Idd5bbfd48009e7a741757743dbaea68e2835a34d
---
M res/res_pjsip_config_wizard.c
1 file changed, 2 insertions(+), 12 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/42/16142/1
diff --git a/res/res_pjsip_config_wizard.c b/res/res_pjsip_config_wizard.c
index e61b7c5..8611be7 100644
--- a/res/res_pjsip_config_wizard.c
+++ b/res/res_pjsip_config_wizard.c
@@ -764,18 +764,8 @@
if (!ast_variable_find_last_in_list(vars, "match")) {
for (host_counter = 0; host_counter < host_count; host_counter++) {
- char *rhost = AST_VECTOR_GET(remote_hosts_vector, host_counter);
- char host[strlen(rhost) + 1];
- char *colon;
-
- /* If there's a :port specified, we have to remove it. */
- strcpy(host, rhost); /* Safe */
- colon = strchr(host, ':');
- if (colon) {
- *colon = '\0';
- }
-
- variable_list_append_return(&vars, "match", host);
+ variable_list_append_return(&vars, "match",
+ AST_VECTOR_GET(remote_hosts_vector, host_counter));
}
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16142
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Idd5bbfd48009e7a741757743dbaea68e2835a34d
Gerrit-Change-Number: 16142
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean at seanbright.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210630/e6590941/attachment-0001.html>
More information about the asterisk-code-review
mailing list