[Asterisk-code-review] Space after port causes unnecessary resolution attempt (asterisk[master])
Francesco Castellano
asteriskteam at digium.com
Tue Mar 22 05:05:45 CDT 2016
Francesco Castellano has uploaded a new change for review.
https://gerrit.asterisk.org/2446
Change subject: Space after port causes unnecessary resolution attempt
......................................................................
Space after port causes unnecessary resolution attempt
Jira ticket: ASTERISK-21301
check_via() already skips leading blanks where the sent-by address (with the
optional port) should be placed.
Since RFC 3261 allows for blanks between the port ant the Via parameters:
> https://tools.ietf.org/html/rfc3261#section-20.42
(actually it allows a lot of blanks more ;-)). I just switched from
ast_skip_blanks() to ast_strip() on the local copy of the string.
Change-Id: Ie5b8fe5a07067b7c0dc9bcdd1707e99b23b02b06
---
M channels/chan_sip.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/46/2446/1
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 97cd6ab..09ab1a1 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -18859,7 +18859,7 @@
c = strchr(via, ' ');
if (c) {
*c = '\0';
- c = ast_skip_blanks(c+1);
+ c = ast_strip(c+1);
if (strcasecmp(via, "SIP/2.0/UDP") && strcasecmp(via, "SIP/2.0/TCP") && strcasecmp(via, "SIP/2.0/TLS")) {
ast_log(LOG_WARNING, "Don't know how to respond via '%s'\n", via);
return;
--
To view, visit https://gerrit.asterisk.org/2446
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5b8fe5a07067b7c0dc9bcdd1707e99b23b02b06
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Francesco Castellano <francesco.castellano at messagenet.it>
More information about the asterisk-code-review
mailing list