From 8b46d5f4bc1803eca95013c4da193a7b8cee348c Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 21 Feb 2014 07:24:18 +0000 Subject: More #1712: Handle case when 200/OK is not ACKed and inv needs to send BYE. In this case, ACK will never be received so don't wait for it. Similar treatment for transport error git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4754 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsip-ua/sip_inv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c index 8fff3ded..4b361e3c 100644 --- a/pjsip/src/pjsip-ua/sip_inv.c +++ b/pjsip/src/pjsip-ua/sip_inv.c @@ -2953,7 +2953,9 @@ PJ_DEF(pj_status_t) pjsip_inv_send_msg( pjsip_inv_session *inv, */ if (tdata->msg->line.req.method.id == PJSIP_BYE_METHOD && inv->role == PJSIP_ROLE_UAS && - inv->state == PJSIP_INV_STATE_CONNECTING) + inv->state == PJSIP_INV_STATE_CONNECTING && + inv->cause != PJSIP_SC_REQUEST_TIMEOUT && + inv->cause != PJSIP_SC_TSX_TRANSPORT_ERROR) { if (inv->pending_bye) pjsip_tx_data_dec_ref(inv->pending_bye); @@ -4213,6 +4215,8 @@ static void inv_on_state_connecting( pjsip_inv_session *inv, pjsip_event *e) pjsip_tx_data *bye; pj_status_t status; + inv_set_cause(inv, tsx->status_code, &tsx->status_text); + /* Send BYE */ status = pjsip_dlg_create_request(inv->dlg, pjsip_get_bye_method(), -- cgit v1.2.3