]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix our compliance with RFC 3261 section 18.2.2.
authorMatthew Nicholson <mnicholson@digium.com>
Wed, 27 Apr 2011 18:57:56 +0000 (18:57 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Wed, 27 Apr 2011 18:57:56 +0000 (18:57 +0000)
commitacfd6d4bad7beaf66e76fdd8546bc2c35a789c73
tree5bc4a43fd7e065fabdae1598bf3aa04701e3e444
parenta851a4834f2aa90ed0fc9a202e8a38ac1455493c
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/branches/1.4@315891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c