From 2edf445f7cabfd0d7890a210b125554ab2bd121b Mon Sep 17 00:00:00 2001 From: mnicholson Date: Wed, 27 Apr 2011 19:15:49 +0000 Subject: 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: http://svn.digium.com/svn/asterisk/trunk@315895 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/sip/reqresp_parser.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'channels/sip') 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); } -- cgit v1.2.3