summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2012-04-26 18:41:33 +0000
committerNanang Izzuddin <nanang@teluu.com>2012-04-26 18:41:33 +0000
commitb52ea39b147465565487a72682293285363c0c2d (patch)
tree6dedea43b415b526458ea766cdd5bab7eb2fced8
parentf0c105c91479a6d63d65f61c20b6fd1017daf076 (diff)
Fix #1496: destroying call media transports in pjsua_media_subsys_destroy() should be done using pjsua_media_channel_deinit().
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4101 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/src/pjsua-lib/pjsua_media.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c
index be8f7fa7..c8bcdd79 100644
--- a/pjsip/src/pjsua-lib/pjsua_media.c
+++ b/pjsip/src/pjsua-lib/pjsua_media.c
@@ -191,22 +191,11 @@ pj_status_t pjsua_media_subsys_destroy(unsigned flags)
/* Close media transports */
for (i=0; i<pjsua_var.ua_cfg.max_calls; ++i) {
- unsigned strm_idx;
- pjsua_call *call = &pjsua_var.calls[i];
- for (strm_idx=0; strm_idx<call->med_cnt; ++strm_idx) {
- pjsua_call_media *call_med = &call->media[strm_idx];
- if (call_med->tp_st != PJSUA_MED_TP_IDLE) {
- pjsua_media_channel_deinit(i);
- }
- if (call_med->tp && call_med->tp_auto_del) {
- /* TODO: check if we're not allowed to send to network in the
- * "flags", and if so do not do TURN allocation...
- */
- PJ_UNUSED_ARG(flags);
- pjmedia_transport_close(call_med->tp);
- }
- call_med->tp = NULL;
- }
+ /* TODO: check if we're not allowed to send to network in the
+ * "flags", and if so do not do TURN allocation...
+ */
+ PJ_UNUSED_ARG(flags);
+ pjsua_media_channel_deinit(i);
}
/* Destroy media endpoint. */