From f033e1a7d2cb58e5eec64aac0cbbc858f5cf0760 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Sun, 21 Sep 2008 22:55:43 +0000 Subject: 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 --- pjsip/src/pjsip-ua/sip_inv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pjsip') 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); -- cgit v1.2.3