From b52ea39b147465565487a72682293285363c0c2d Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Thu, 26 Apr 2012 18:41:33 +0000 Subject: 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 --- pjsip/src/pjsua-lib/pjsua_media.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'pjsip/src') 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; imed_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. */ -- cgit v1.2.3