diff options
author | Corey Farrell <git@cfware.com> | 2014-02-10 18:28:35 +0000 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2014-02-10 18:28:35 +0000 |
commit | cb4e2107735dc05c1ad96b6a955c056e06b8dc1c (patch) | |
tree | 7200a261115a632a38ae4f12049359ee061cc4ee /channels/sip/include/reqresp_parser.h | |
parent | 72bf9b13150f50198a302c365c6c3274d38c2ebc (diff) |
chan_sip: Isolate code that manages struct sip_route.
* Move route code to sip/route.c + sip/include/route.h
* Rename functions to sip_route_*
* Replace ad-hoc list code with macro's from linkedlists.h
* Create sip_route_process_header() to processes Path and Record-Route headers
(previously done with different code in build_route and build_path)
* Add use of const where possible
* Move struct uriparams, struct contact and contactliststruct from sip.h to
reqresp_parser.h. sip/route.c uses reqresp_parser.h but not sip.h, this was
a problem. These moved declares are not used outside of reqresp_parser.
* While modifying reqprep() the lack of {} caused me trouble. I added them.
* Code outside route.c treats sip_route as an opaque structure, using macro's
or procedures for all access.
(closes issue ASTERISK-22582)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3173/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sip/include/reqresp_parser.h')
-rw-r--r-- | channels/sip/include/reqresp_parser.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/channels/sip/include/reqresp_parser.h b/channels/sip/include/reqresp_parser.h index 02b046bc7..7f9c8f6d9 100644 --- a/channels/sip/include/reqresp_parser.h +++ b/channels/sip/include/reqresp_parser.h @@ -22,6 +22,30 @@ #ifndef _SIP_REQRESP_H #define _SIP_REQRESP_H +/*! \brief uri parameters */ +struct uriparams { + char *transport; + char *user; + char *method; + char *ttl; + char *maddr; + int lr; +}; + +struct contact { + AST_LIST_ENTRY(contact) list; + char *name; + char *user; + char *pass; + char *hostport; + struct uriparams params; + char *headers; + char *expires; + char *q; +}; + +AST_LIST_HEAD_NOLOCK(contactliststruct, contact); + /*! * \brief parses a URI in its components. * |