chan_sip parse code refactoring plus two new unit tests
authorDavid Vossel <dvossel@digium.com>
Mon, 15 Feb 2010 15:45:02 +0000 (15:45 +0000)
committerDavid Vossel <dvossel@digium.com>
Mon, 15 Feb 2010 15:45:02 +0000 (15:45 +0000)
commit2003243947d6cc11141a264f7b04b57b35b0cc00
tree72b0e2d48f3f92adf9294911b59271a48180b958
parent7d5d0311c1d08f98424764b3c392f214cddc52d2
chan_sip parse code refactoring plus two new unit tests

Code Refactoring Changes
- read_to_parts() moved to reqresp_parser.c and has been renamed as
  get_name_and_number()
- get_in_brackets() moved to reqresp_parser.c
- find_closing_quotes() added to sip_utils.h
Logic Changes
- get_name_and_number() now uses parse_uri() and get_calleridname()
  for parsing. Before this change only names within quotes were
  found, when names not within quotes are possible.
New Unit Tests
-sip_get_name_and_number_test
-sip_get_in_brackets_test

(closes issue #16707)
Reported by: Nick_Lewis
Patches:
      issue16706.diff uploaded by dvossel (license 671)

Review: https://reviewboard.asterisk.org/r/499/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c
channels/sip/include/reqresp_parser.h
channels/sip/include/sip_utils.h
channels/sip/reqresp_parser.c