]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix a problem where chan_sip would ignore "old" but valid responses.
authorMark Michelson <mmichelson@digium.com>
Mon, 29 Jun 2009 21:23:43 +0000 (21:23 +0000)
committerMark Michelson <mmichelson@digium.com>
Mon, 29 Jun 2009 21:23:43 +0000 (21:23 +0000)
commit9589d9fb2e5086bc28b404ba8744a15361ea409a
treef662c1a0deccb73c85fcbb4f9f173a97672424ef
parent399bd49b7d5eb379603b45345b9fea850ca0b8d1
Fix a problem where chan_sip would ignore "old" but valid responses.

chan_sip has had a problem for quite a long time that would manifest when
Asterisk would send multiple SIP responses on the same dialog before receiving
a response. The problem occurred because chan_sip only kept track of the highest
outgoing sequence number used on the dialog. If Asterisk sent two requests out,
and a response arrived for the first request sent, then Asterisk would ignore
the response. The result was that Asterisk would continue retransmitting the
requests and ignoring the responses until the maximum number of retransmissions
had been reached.

The fix here is to rearrange the code a bit so that instead of simply comparing
the sequence number of the response to our latest outgoing sequence number, we
walk our list of outstanding packets and determine if there is a match. If there is,
we continue. If not, then we ignore the response.

In doing this, I found a few completely useless variables that I have now removed.

(closes issue #11231)
Reported by: flefoll

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@204243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c