diff options
author | Liong Sauw Ming <ming@teluu.com> | 2011-10-31 10:31:23 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2011-10-31 10:31:23 +0000 |
commit | 5d2066e0c3368cce23090e842c407a35bc351a83 (patch) | |
tree | c188d02e9322edef6defc9161d8cb26a736108ba /pjsip/src/pjsip-ua | |
parent | d63fe414b41e56ccdcb45f6924e60cdc8a2ad3a4 (diff) |
Re #1395: Backport of PJSIP 1.x branch into PJSIP 2.0 trunk
* Backport of r3833:r3877
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3878 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsip-ua')
-rw-r--r-- | pjsip/src/pjsip-ua/sip_inv.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c index 46153c9f..8c2c92d0 100644 --- a/pjsip/src/pjsip-ua/sip_inv.c +++ b/pjsip/src/pjsip-ua/sip_inv.c @@ -455,17 +455,25 @@ static pj_bool_t mod_inv_on_rx_request(pjsip_rx_data *rdata) */ if (method->id == PJSIP_ACK_METHOD && inv) { + /* Ignore if we don't have INVITE in progress */ + if (!inv->invite_tsx) { + return PJ_TRUE; + } + /* Ignore ACK if pending INVITE transaction has not finished. */ - if (inv->invite_tsx && - inv->invite_tsx->state < PJSIP_TSX_STATE_COMPLETED) - { + if (inv->invite_tsx->state < PJSIP_TSX_STATE_COMPLETED) { + return PJ_TRUE; + } + + /* Ignore ACK with different CSeq + * https://trac.pjsip.org/repos/ticket/1391 + */ + if (rdata->msg_info.cseq->cseq != inv->invite_tsx->cseq) { return PJ_TRUE; } /* Terminate INVITE transaction, if it's still present. */ - if (inv->invite_tsx && - inv->invite_tsx->state <= PJSIP_TSX_STATE_COMPLETED) - { + if (inv->invite_tsx->state <= PJSIP_TSX_STATE_COMPLETED) { /* Before we terminate INVITE transaction, process the SDP * in the ACK request, if any. * Only do this when invite state is not already disconnected |