summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-09-21 22:55:43 +0000
committerBenny Prijono <bennylp@teluu.com>2008-09-21 22:55:43 +0000
commitf033e1a7d2cb58e5eec64aac0cbbc858f5cf0760 (patch)
treeb406285b80d7068d80daeb738e3e841e6334b3b4
parent1c3403cb07d41dd58d8d69ae887f9690d2785f9d (diff)
Ticket #640: Crash when receiving ACK with SDP after BYE has been received (thanks Amit Sharma for the report)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2304 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/src/pjsip-ua/sip_inv.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c
index 371abb76..f61f26f8 100644
--- a/pjsip/src/pjsip-ua/sip_inv.c
+++ b/pjsip/src/pjsip-ua/sip_inv.c
@@ -424,9 +424,13 @@ static pj_bool_t mod_inv_on_rx_request(pjsip_rx_data *rdata)
inv->invite_tsx->state <= PJSIP_TSX_STATE_COMPLETED)
{
/* Before we terminate INVITE transaction, process the SDP
- * in the ACK request, if any.
+ * in the ACK request, if any.
+ * Only do this when invite state is not already disconnected
+ * (http://trac.pjsip.org/repos/ticket/640).
*/
- inv_check_sdp_in_incoming_msg(inv, inv->invite_tsx, rdata);
+ if (inv->state < PJSIP_INV_STATE_DISCONNECTED) {
+ inv_check_sdp_in_incoming_msg(inv, inv->invite_tsx, rdata);
+ }
/* Now we can terminate the INVITE transaction */
pj_assert(inv->invite_tsx->status_code >= 200);