Fixed ticket #284: Failed scenarios with CANCEL requests (thanks Esbjörn Dominique)
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1287 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
bbeb3999fe
commit
0606e704cd
|
@ -223,6 +223,7 @@ struct pjsip_inv_session
|
||||||
char obj_name[PJ_MAX_OBJ_NAME]; /**< Log identification */
|
char obj_name[PJ_MAX_OBJ_NAME]; /**< Log identification */
|
||||||
pj_pool_t *pool; /**< Dialog's pool. */
|
pj_pool_t *pool; /**< Dialog's pool. */
|
||||||
pjsip_inv_state state; /**< Invite sess state. */
|
pjsip_inv_state state; /**< Invite sess state. */
|
||||||
|
pj_bool_t cancelling; /**< CANCEL sent? */
|
||||||
pjsip_status_code cause; /**< Disconnect cause. */
|
pjsip_status_code cause; /**< Disconnect cause. */
|
||||||
pj_str_t cause_text; /**< Cause text. */
|
pj_str_t cause_text; /**< Cause text. */
|
||||||
pj_bool_t notify; /**< Internal. */
|
pj_bool_t notify; /**< Internal. */
|
||||||
|
|
|
@ -1560,6 +1560,7 @@ PJ_DEF(pj_status_t) pjsip_inv_end_session( pjsip_inv_session *inv,
|
||||||
|
|
||||||
/* Done */
|
/* Done */
|
||||||
|
|
||||||
|
inv->cancelling = PJ_TRUE;
|
||||||
*p_tdata = tdata;
|
*p_tdata = tdata;
|
||||||
|
|
||||||
return PJ_SUCCESS;
|
return PJ_SUCCESS;
|
||||||
|
@ -1950,7 +1951,9 @@ static void inv_on_state_calling( pjsip_inv_session *inv, pjsip_event *e)
|
||||||
inv_check_sdp_in_incoming_msg(inv, tsx,
|
inv_check_sdp_in_incoming_msg(inv, tsx,
|
||||||
e->body.tsx_state.src.rdata);
|
e->body.tsx_state.src.rdata);
|
||||||
|
|
||||||
} else if (tsx->status_code==401 || tsx->status_code==407) {
|
} else if ((tsx->status_code==401 || tsx->status_code==407) &&
|
||||||
|
!inv->cancelling)
|
||||||
|
{
|
||||||
|
|
||||||
/* Handle authentication failure:
|
/* Handle authentication failure:
|
||||||
* Resend the request with Authorization header.
|
* Resend the request with Authorization header.
|
||||||
|
|
Loading…
Reference in New Issue