summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-05-13 08:57:38 +0000
committerBenny Prijono <bennylp@teluu.com>2009-05-13 08:57:38 +0000
commit271373913761ecf033feeba1693a11f7be9f79df (patch)
treef92d70c0a271619407a74fb55859ff5a0d425a71 /pjsip
parent114b3b7ec7ac26aa1024663a22bb3a74101eaf09 (diff)
Fixed ticket #845: Crash in 100rel after CANCEL is received and 487 is sent (thanks Gang Liu for the report)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2697 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/src/pjsip-ua/sip_inv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c
index 4966da5d..fc489440 100644
--- a/pjsip/src/pjsip-ua/sip_inv.c
+++ b/pjsip/src/pjsip-ua/sip_inv.c
@@ -2480,7 +2480,12 @@ static void inv_respond_incoming_cancel(pjsip_inv_session *inv,
if (status == PJ_SUCCESS) {
/* Remove the message body */
tdata->msg->body = NULL;
- pjsip_dlg_send_response(inv->dlg, invite_tsx, tdata);
+ if (inv->options & PJSIP_INV_REQUIRE_100REL) {
+ status = pjsip_100rel_tx_response(inv, tdata);
+ } else {
+ status = pjsip_dlg_send_response(inv->dlg, invite_tsx,
+ tdata);
+ }
}
}