summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2011-11-02 07:53:38 +0000
committerBenny Prijono <bennylp@teluu.com>2011-11-02 07:53:38 +0000
commita7e2db80515427b79ac3432c1f77e606c63e1ba7 (patch)
tree19c6cf3ac5d18f9a8ae18a96587bdaf27d16cff5
parent3b778f399fc5ada686ed4bdc9f1ee93121c702e7 (diff)
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
-rw-r--r--pjsip/src/pjsip/sip_transaction.c8
1 files changed, 7 insertions, 1 deletions
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,