summaryrefslogtreecommitdiff
path: root/channels/sip/reqresp_parser.c
diff options
context:
space:
mode:
authorMatthew Nicholson <mnicholson@digium.com>2011-04-27 19:15:49 +0000
committerMatthew Nicholson <mnicholson@digium.com>2011-04-27 19:15:49 +0000
commite87639fc265eb91d1982c72854cefc25fad5ce80 (patch)
tree467bf9724beadf72b8f8f1f6c463a28b0868e45a /channels/sip/reqresp_parser.c
parent696c77c59ee7b29a7aef92288cedc37bc25cb817 (diff)
Merged revisions 315894 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r315894 | mnicholson | 2011-04-27 14:14:27 -0500 (Wed, 27 Apr 2011) | 28 lines Merged revisions 315893 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r315893 | mnicholson | 2011-04-27 14:03:05 -0500 (Wed, 27 Apr 2011) | 21 lines Merged revisions 315891 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r315891 | mnicholson | 2011-04-27 13:57:56 -0500 (Wed, 27 Apr 2011) | 14 lines Fix our compliance with RFC 3261 section 18.2.2. This change optimizes the free_via() function and removes some redundant null checking. It also fixes compliance with RFC 3261 section 18.2.2 by always using the port specified in the Via header for routing responses (even when maddr is not set). Also the htons() function is now used when setting the port. Additional documentation comments have been added in various places to make the logic in the code clearer. (closes issue #18951) Reported by: jmls Patches: issue18951_set_proper_port_from_via.patch uploaded by wdoekes (license 717) (modified) ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sip/reqresp_parser.c')
-rw-r--r--channels/sip/reqresp_parser.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/channels/sip/reqresp_parser.c b/channels/sip/reqresp_parser.c
index 594bcfad9..9edf5bd45 100644
--- a/channels/sip/reqresp_parser.c
+++ b/channels/sip/reqresp_parser.c
@@ -2253,10 +2253,7 @@ void free_via(struct sip_via *v)
return;
}
- if (v->via) {
- ast_free(v->via);
- }
-
+ ast_free(v->via);
ast_free(v);
}