diff options
author | Liong Sauw Ming <ming@teluu.com> | 2011-09-28 04:20:30 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2011-09-28 04:20:30 +0000 |
commit | 90bbdfb85e44e2be7a185a7f8288bd50371d735a (patch) | |
tree | a5046cdc2efa4959dc64a9a1275ba5134b2bc23e /pjsip/src | |
parent | ba2dc4a7b2dc047fafca1f64c3503f0b1d40e473 (diff) |
Re #1266: Fixed failed automated tests for ICE
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3775 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_call.c | 6 | ||||
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_media.c | 20 |
2 files changed, 18 insertions, 8 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index d3c655f1..02f3f6a3 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -612,8 +612,10 @@ PJ_DEF(pj_status_t) pjsua_call_make_call( pjsua_acc_id acc_id, call->user_data = user_data; call->async_call.call_var.out_call.options = options; - call->async_call.call_var.out_call.msg_data = pjsua_msg_data_clone( - dlg->pool, msg_data); + if (msg_data) { + call->async_call.call_var.out_call.msg_data = pjsua_msg_data_clone( + dlg->pool, msg_data); + } call->async_call.dlg = dlg; /* Init media channel */ diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c index 626965b5..aee2f1f4 100644 --- a/pjsip/src/pjsua-lib/pjsua_media.c +++ b/pjsip/src/pjsua-lib/pjsua_media.c @@ -1414,16 +1414,24 @@ pj_status_t pjsua_call_media_init(pjsua_call_media *call_med, if (pjsua_var.media_cfg.enable_ice) { status = create_ice_media_transport(tcfg, call_med, async); + if (async && status == PJ_SUCCESS) { + /* Callback has been called. */ + call_med->med_init_cb = NULL; + /* We cannot return PJ_SUCCESS here since we already call + * the callback. + */ + return PJ_EPENDING; + } else if (async && status == PJ_EPENDING) { + /* We will resume call media initialization in the + * on_ice_complete() callback. + */ + return PJ_EPENDING; + } } else { status = create_udp_media_transport(tcfg, call_med); } - if (status == PJ_EPENDING) { - /* We will resume call media initialization in the - * on_ice_complete() callback. - */ - return PJ_EPENDING; - } else if (status != PJ_SUCCESS) { + if (status != PJ_SUCCESS) { PJ_PERROR(1,(THIS_FILE, status, "Error creating media transport")); return status; } |