summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2013-04-03 08:21:47 +0000
committerBenny Prijono <bennylp@teluu.com>2013-04-03 08:21:47 +0000
commit1a400a5fa5a8e76a5fbefee88bd21864cca38090 (patch)
treec780958d930756e21a8b852c15d916e0cf3427f6 /pjsip
parent9e851bfd3ac81d8a9a48e25b2ede7f7455ef4d53 (diff)
Fixed #1653: [incompatible] pjsua_call_update() API should not release hold
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4457 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index b7504e72..73225763 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -2495,11 +2495,17 @@ PJ_DEF(pj_status_t) pjsua_call_update2(pjsua_call_id call_id,
}
/* Create SDP */
- status = pjsua_media_channel_create_sdp(call->index,
- call->inv->pool_prov,
- NULL, &sdp, NULL);
+ if (call->local_hold && (call->opt.flag & PJSUA_CALL_UNHOLD)==0) {
+ status = create_sdp_of_call_hold(call, &sdp);
+ } else {
+ status = pjsua_media_channel_create_sdp(call->index,
+ call->inv->pool_prov,
+ NULL, &sdp, NULL);
+ call->local_hold = PJ_FALSE;
+ }
+
if (status != PJ_SUCCESS) {
- pjsua_perror(THIS_FILE, "Unable to get SDP from media endpoint",
+ pjsua_perror(THIS_FILE, "Unable to get SDP from media endpoint",
status);
goto on_return;
}