summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2013-08-21 09:32:24 +0000
committerLiong Sauw Ming <ming@teluu.com>2013-08-21 09:32:24 +0000
commitaed0a007c128947e004e9963a84b69a68465d3d9 (patch)
tree4083a9b04eb7ba24678d25ebca23a491c1d53cd0 /pjsip
parent250f69e1d4f73a400e5112b31ffcdb7133993e00 (diff)
Re #817: Fix replying to re-INVITE after it was cancelled (thanks to Saúl Ibarra Corretgé for the patch)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4583 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/include/pjsip-ua/sip_inv.h4
-rw-r--r--pjsip/src/pjsip-ua/sip_inv.c13
2 files changed, 6 insertions, 11 deletions
diff --git a/pjsip/include/pjsip-ua/sip_inv.h b/pjsip/include/pjsip-ua/sip_inv.h
index 4e5f820e..5782cf92 100644
--- a/pjsip/include/pjsip-ua/sip_inv.h
+++ b/pjsip/include/pjsip-ua/sip_inv.h
@@ -172,6 +172,10 @@ typedef struct pjsip_inv_callback
* #pjsip_inv_set_sdp_answer() and the re-INVITE will be answered
* automatically.
*
+ * Remarks: Application may need to monitor on_tsx_state_changed()
+ * callback to check whether the re-INVITE is already answered
+ * automatically with 487 due to being cancelled.
+ *
* @param inv The invite session.
* @param offer Remote offer.
* @param rdata The received re-INVITE request.
diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c
index 8c63f760..e73049bf 100644
--- a/pjsip/src/pjsip-ua/sip_inv.c
+++ b/pjsip/src/pjsip-ua/sip_inv.c
@@ -4271,18 +4271,9 @@ static void inv_on_state_confirmed( pjsip_inv_session *inv, pjsip_event *e)
{
/*
- * Handle strandled incoming CANCEL.
+ * Handle strandled incoming CANCEL or CANCEL for re-INVITE
*/
- pjsip_rx_data *rdata = e->body.tsx_state.src.rdata;
- pjsip_tx_data *tdata;
- pj_status_t status;
-
- status = pjsip_dlg_create_response(dlg, rdata, 200, NULL, &tdata);
- if (status != PJ_SUCCESS) return;
-
- status = pjsip_dlg_send_response(dlg, tsx, tdata);
- if (status != PJ_SUCCESS) return;
-
+ inv_respond_incoming_cancel(inv, tsx, e);
}
else if (tsx->method.id == PJSIP_INVITE_METHOD &&
tsx->role == PJSIP_ROLE_UAS)