Fix crash due to trying to send a re-invite while in the incorrect state.
authorJoshua Colp <jcolp@digium.com>
Thu, 25 Jul 2013 20:54:17 +0000 (20:54 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 25 Jul 2013 20:54:17 +0000 (20:54 +0000)
commitddd02c0303b281183c37db5617a2d9c78265492f
treee0df727f72738c6d480272fd84edb870b5db73cc
parent1aaa26796d6f56b7cd50a70854ccdaa021645be1
Fix crash due to trying to send a re-invite while in the incorrect state.

This crash would occur if a re-invite was queued while the initial INVITE
transaction was still occurring and the response to the INVITE was not ACKed.
This lack of ACK would cause the INVITE session state to never reach confirmed.
Once the transaction terminated, however, the queued re-invite would occur and
cause a crash due to this lack of state change.

This fix checks the INVITE session state before performing the re-invite to
ensure it is in the required confirmed state.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_sip_session.c