From 3e42cd47f420cbb4e3fbe3da345cbade550eef3c Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 15 Sep 2021 09:34:21 -0400 Subject: [PATCH] TT#14008 don't try to update kernel stats for no-kernel streams Set NO_KERNEL_SUPPORT when we don't actually kernelise the stream, and use that flag when trying to pull stream stats. probably closes #1337 Change-Id: I46af55e353d87c5afdda3c106d1f3470273105bf (cherry picked from commit 702dd9bb1379a909fa6578b0ff069c87c9857ddc) --- daemon/media_socket.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/daemon/media_socket.c b/daemon/media_socket.c index a01e2d4e2..dd266541f 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -1330,13 +1330,14 @@ void kernelize(struct packet_stream *stream) { } } - if (reti.local.family) { - kernel_add_stream(&reti); - struct rtpengine_destination_info *redi; - while ((redi = g_queue_pop_head(&outputs))) { - kernel_add_destination(redi); - g_slice_free1(sizeof(*redi), redi); - } + if (!reti.local.family) + goto no_kernel; + + kernel_add_stream(&reti); + struct rtpengine_destination_info *redi; + while ((redi = g_queue_pop_head(&outputs))) { + kernel_add_destination(redi); + g_slice_free1(sizeof(*redi), redi); } PS_SET(stream, KERNELIZED); @@ -1482,6 +1483,8 @@ void media_update_stats(struct call_media *m) { continue; if (!PS_ISSET(ps, KERNELIZED)) continue; + if (PS_ISSET(ps, NO_KERNEL_SUPPORT)) + continue; __stream_update_stats(ps, 0); }