From 4de2be3b3232ad90996e7686715b4db68ede94a7 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Tue, 11 Mar 2014 02:50:36 +0000 Subject: Fixed #1746: Assertion in sip_transaction.c when ACK and retransmit timer events occur simultaneously git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4787 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsip/sip_transaction.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pjsip/src/pjsip/sip_transaction.c b/pjsip/src/pjsip/sip_transaction.c index a025d870..dfb0751b 100644 --- a/pjsip/src/pjsip/sip_transaction.c +++ b/pjsip/src/pjsip/sip_transaction.c @@ -3242,16 +3242,22 @@ static pj_status_t tsx_on_state_confirmed( pjsip_transaction *tsx, msg->line.req.method.id == PJSIP_INVITE_METHOD); } else if (event->type == PJSIP_EVENT_TIMER) { - /* Must be from timeout_timer_. */ - pj_assert(event->body.timer.entry == &tsx->timeout_timer); - - /* Move to Terminated state. */ - tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, - PJSIP_EVENT_TIMER, &tsx->timeout_timer ); + /* Ignore overlapped retransmit timer. + * https://trac.pjsip.org/repos/ticket/1746 + */ + if (event->body.timer.entry == &tsx->retransmit_timer) { + /* Ignore */ + } else { + /* Must be from timeout_timer_. */ + pj_assert(event->body.timer.entry == &tsx->timeout_timer); - /* Transaction has been destroyed. */ - //return PJSIP_ETSXDESTROYED; + /* Move to Terminated state. */ + tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, + PJSIP_EVENT_TIMER, &tsx->timeout_timer ); + /* Transaction has been destroyed. */ + //return PJSIP_ETSXDESTROYED; + } } else { pj_assert(!"Unexpected event"); return PJ_EBUG; -- cgit v1.2.3