diff options
author | Benny Prijono <bennylp@teluu.com> | 2014-03-11 02:50:36 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2014-03-11 02:50:36 +0000 |
commit | 4de2be3b3232ad90996e7686715b4db68ede94a7 (patch) | |
tree | 3c134920f9b89ed040b34e59ae14af48ff865d70 | |
parent | f3bfb967699d1697c81c5bc8f22824c648dff7e7 (diff) |
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
-rw-r--r-- | pjsip/src/pjsip/sip_transaction.c | 22 |
1 files 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; |