diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2014-04-21 05:40:32 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2014-04-21 05:40:32 +0000 |
commit | eedb95190afc53d91552a22088e7ccd7f1d4ee3e (patch) | |
tree | c87afdc3a7972f68f960bf816c236f45f86b75b7 /pjsip | |
parent | be38c23ca75abe95e8f57c1fead45bc408809333 (diff) |
Fix #1759: Added check for call disconnection in ICE media transport creation.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4820 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_media.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c index 4beb821c..791126a0 100644 --- a/pjsip/src/pjsua-lib/pjsua_media.c +++ b/pjsip/src/pjsua-lib/pjsua_media.c @@ -851,7 +851,15 @@ static pj_status_t create_ice_media_transport( PJSUA_LOCK(); } - if (async && call_med->tp_ready == PJ_EPENDING) { + if (!call_med->tp) { + /* Call has been disconnected, and media transports have been cleared + * (see ticket #1759). + */ + PJ_LOG(4,(THIS_FILE, "Media transport initialization cancelled " + "because call has been disconnected")); + status = PJ_ECANCELLED; + goto on_error; + } else if (async && call_med->tp_ready == PJ_EPENDING) { return PJ_EPENDING; } else if (call_med->tp_ready != PJ_SUCCESS) { pjsua_perror(THIS_FILE, "Error initializing ICE media transport", |