]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_pjsip: Fix bug where custom SIP headers could be duplicated on outgoing INVITEs.
authorMark Michelson <mmichelson@digium.com>
Mon, 9 Jun 2014 20:20:50 +0000 (20:20 +0000)
committerMark Michelson <mmichelson@digium.com>
Mon, 9 Jun 2014 20:20:50 +0000 (20:20 +0000)
commit73d28c173c3def55847bc58554a4524f14decd68
tree3911b5b8df6afd69a6667a8d367db83fefb93039
parent26629d2b75876b050b83351124e7ace19b03bb5c
chan_pjsip: Fix bug where custom SIP headers could be duplicated on outgoing INVITEs.

When using PJSIP_HEADER() to add custom headers to outgoing INVITE requests, certain
situations could result in the headers being duplicated. For instance, if the request
were retransmitted, or if the INVITE were re-sent with authentication credentials,
the custom headers would be re-added to the request.

The fix here is to, after adding the custom headers to the outbound INVITE, remove
the datastore that holds the custom headers to add. This way, there is no risk in
accidentally adding them if the session supplement is called into a second or third
time.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@415579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_pjsip_header_funcs.c