summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorFrancesco Castellano <francesco.castellano@messagenet.it>2015-11-20 15:02:48 +0100
committerJoshua Colp <jcolp@digium.com>2016-03-23 08:58:43 -0500
commitc5170677e72e48b487462e79a31974845a417dce (patch)
tree23f01ffb056600c1190a4efcd064a1edf25288ff /channels
parent7d6782cc0feb5357c6e9feb7c810f7fbe76190f0 (diff)
chan_sip.c: Space after port causes unnecessary resolution attempt
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. ASTERISK-21301 #close Change-Id: Ie5b8fe5a07067b7c0dc9bcdd1707e99b23b02b06
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 9e7872b20..83d3ea0eb 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -18815,7 +18815,7 @@ static void check_via(struct sip_pvt *p, const struct sip_request *req)
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;