Merge "res_pjsip_session.c: Fix unbound srv failover tests."

changes/40/3640/1
zuul 9 years ago committed by Gerrit Code Review
commit 57f3e992e4

@ -2773,22 +2773,21 @@ static void session_inv_on_tsx_state_changed(pjsip_inv_session *inv, pjsip_trans
} }
break; break;
case PJSIP_EVENT_TRANSPORT_ERROR: case PJSIP_EVENT_TRANSPORT_ERROR:
/* if (inv->state == PJSIP_INV_STATE_DISCONNECTED) {
* Clear the module data now to block session_inv_on_state_changed() /*
* from calling session_end() if it hasn't already done so. * Clear the module data now to block session_inv_on_state_changed()
*/ * from calling session_end() if it hasn't already done so.
inv->mod_data[id] = NULL; */
inv->mod_data[id] = NULL;
if (inv->state != PJSIP_INV_STATE_DISCONNECTED) { /*
session_end(session); * Pass the session ref held by session->inv_session to
* session_end_completion().
*/
session_end_completion(session);
return;
} }
break;
/*
* Pass the session ref held by session->inv_session to
* session_end_completion().
*/
session_end_completion(session);
return;
case PJSIP_EVENT_TIMER: case PJSIP_EVENT_TIMER:
/* /*
* The timer event is run by the pjsip monitor thread and not * The timer event is run by the pjsip monitor thread and not
@ -2808,7 +2807,8 @@ static void session_inv_on_tsx_state_changed(pjsip_inv_session *inv, pjsip_trans
* Pass the session ref held by session->inv_session to * Pass the session ref held by session->inv_session to
* session_end_completion(). * session_end_completion().
*/ */
if (ast_sip_push_task(session->serializer, session_end_completion, session)) { if (session
&& ast_sip_push_task(session->serializer, session_end_completion, session)) {
/* Do it anyway even though this is not the right thread. */ /* Do it anyway even though this is not the right thread. */
session_end_completion(session); session_end_completion(session);
} }

Loading…
Cancel
Save