From 064ca97fad7f636f404d3b1e031fbb7d61b8853c Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Tue, 6 Mar 2012 07:18:23 +0000 Subject: Fixed #1460: Allow call to transition to CONFIRMED state even when SDP negotiation is pending if the pending negotiation is an updated offer and not the original one with the INVITE transaction git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3964 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsip-ua/sip_inv.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pjsip') diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c index 66f9c63a..dc3ffb22 100644 --- a/pjsip/src/pjsip-ua/sip_inv.c +++ b/pjsip/src/pjsip-ua/sip_inv.c @@ -212,7 +212,16 @@ void inv_set_state(pjsip_inv_session *inv, pjsip_inv_state state, * otherwise disconnect the session. */ if (state == PJSIP_INV_STATE_CONFIRMED) { - if (pjmedia_sdp_neg_get_state(inv->neg)!=PJMEDIA_SDP_NEG_STATE_DONE) { + struct tsx_inv_data *tsx_inv_data = NULL; + + if (inv->invite_tsx) { + tsx_inv_data = (struct tsx_inv_data*) + inv->invite_tsx->mod_data[mod_inv.mod.id]; + } + + if (pjmedia_sdp_neg_get_state(inv->neg)!=PJMEDIA_SDP_NEG_STATE_DONE && + (tsx_inv_data && !tsx_inv_data->sdp_done) ) + { pjsip_tx_data *bye; PJ_LOG(4,(inv->obj_name, "SDP offer/answer incomplete, ending the " -- cgit v1.2.3