From a7e2db80515427b79ac3432c1f77e606c63e1ba7 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Wed, 2 Nov 2011 07:53:38 +0000 Subject: Fixed #1414: Removed assertion in transaction when event other than timer is received in TERMINATED state git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3881 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsip/sip_transaction.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pjsip') diff --git a/pjsip/src/pjsip/sip_transaction.c b/pjsip/src/pjsip/sip_transaction.c index 93f5d813..31a3bb5d 100644 --- a/pjsip/src/pjsip/sip_transaction.c +++ b/pjsip/src/pjsip/sip_transaction.c @@ -3197,7 +3197,13 @@ static pj_status_t tsx_on_state_terminated( pjsip_transaction *tsx, pjsip_event *event) { pj_assert(tsx->state == PJSIP_TSX_STATE_TERMINATED); - pj_assert(event->type == PJSIP_EVENT_TIMER); + + /* Ignore events other than timer. This used to be an assertion but + * events may genuinely arrive at this state. + */ + if (event->type != PJSIP_EVENT_TIMER) { + return PJ_EIGNORED; + } /* Destroy this transaction */ tsx_set_state(tsx, PJSIP_TSX_STATE_DESTROYED, -- cgit v1.2.3