From: Bradley Jokinen Date: Thu, 13 Apr 2017 20:43:42 +0000 (-0500) Subject: FS-10231 Fix issue with media bugs not being completely cleaned up when session is... X-Git-Tag: v1.6.18~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05c499a7b4e8c487f389a794bf33f2d5210c8a69;p=thirdparty%2Ffreeswitch.git FS-10231 Fix issue with media bugs not being completely cleaned up when session is destroyed --- diff --git a/src/switch_core_media_bug.c b/src/switch_core_media_bug.c index 0928939a71..7299a431dd 100644 --- a/src/switch_core_media_bug.c +++ b/src/switch_core_media_bug.c @@ -1197,17 +1197,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_remove_all_function(switch continue; } - if (bp->callback) { - bp->callback(bp, bp->user_data, SWITCH_ABC_TYPE_CLOSE); - } - switch_core_media_bug_destroy(bp); - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Removing BUG from %s\n", switch_channel_get_name(session->channel)); - if (last) { last->next = bp->next; } else { session->bugs = bp->next; } + + switch_core_media_bug_close(&bp); } switch_thread_rwlock_unlock(session->bug_rwlock); status = SWITCH_STATUS_SUCCESS;