]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_session.c: Fix unbound srv failover tests. 98/3598/1
authorRichard Mudgett <rmudgett@digium.com>
Wed, 17 Aug 2016 19:13:56 +0000 (14:13 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 17 Aug 2016 19:13:56 +0000 (14:13 -0500)
commitd833ef6523298f0edf0280bd40e2b2175961e660
tree4ca2d7bf320241fd8daa96f5c728240c05bf0f59
parent41e9bf60aa99c063d7dd0d10ab80a1053f4c15af
res_pjsip_session.c: Fix unbound srv failover tests.

Commit 1b666549f33d69dc080b212bf92126f3bc3a18b2 broke the srv failover
functionality if a TCP connection gets disconnected.  Under these
conditions, session_inv_on_state_changed() gets a
PJSIP_EVENT_TRANSPORT_ERROR and restarts the INVITE transaction on a new
transport.  Unfortunately, session_inv_on_tsx_state_changed() also gets
the same PJSIP_EVENT_TRANSPORT_ERROR event and unconditionally terminates
the session.

* Made session_inv_on_tsx_state_changed() complete terminating the session
on PJSIP_EVENT_TRANSPORT_ERROR only if the session state is still
PJSIP_INV_STATE_DISCONNECTED.

ASTERISK-26305 #close
Reported by: Richard Mudgett

Change-Id: If736e766b5c55b970fa38ca6c8a885caf27b897d
res/res_pjsip_session.c