From b144802c32088741a340a85101e734dc4603995a Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Wed, 10 Feb 2010 08:48:27 +0000 Subject: Fixed ticket #1011: "Invalid operation step" assertion when TCP is used git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3094 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsip-ua/sip_inv.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c index 3afdeb68..eb2c20f3 100644 --- a/pjsip/src/pjsip-ua/sip_inv.c +++ b/pjsip/src/pjsip-ua/sip_inv.c @@ -351,9 +351,12 @@ static pj_status_t inv_send_ack(pjsip_inv_session *inv, pjsip_event *e) PJ_LOG(5,(inv->obj_name, "Received %s, sending ACK", pjsip_rx_data_get_info(rdata))); - /* Check if we have cached ACK request */ - if (inv->last_ack && rdata->msg_info.cseq->cseq == inv->last_ack_cseq) { - + /* Check if we have cached ACK request. Must not use the cached ACK + * if it's still marked as pending by transport (#1011) + */ + if (inv->last_ack && rdata->msg_info.cseq->cseq == inv->last_ack_cseq && + !inv->last_ack->is_pending) + { pjsip_tx_data_add_ref(inv->last_ack); } else if (mod_inv.cb.on_send_ack) { -- cgit v1.2.3