From 56005da1c5b5ab6f971541149d4e8f4fcf090c60 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Tue, 17 Sep 2024 12:26:37 +0200 Subject: [PATCH] MT#60476 sdp_create: detect if media is active Don't just set always to true (if media is active), but check if it's a MESSAGE type, which is by default inactive. Change-Id: I492e6fb62acb6fb6a112353535171a22e93baf3f --- daemon/sdp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/daemon/sdp.c b/daemon/sdp.c index be807c263..fc29dd8f9 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -3807,6 +3807,9 @@ void handle_sdp_media_attributes(GString *s, struct call_media *media, struct call_monologue *monologue = media->monologue; + /* if this is a message type, just leave everything untouched */ + bool is_active = (media->type_id == MT_MESSAGE) ? false : true; + /* add actual media connection */ sdp_out_add_media_connection(s, media, rtp_ps, flags); @@ -3814,7 +3817,8 @@ void handle_sdp_media_attributes(GString *s, struct call_media *media, sdp_out_add_bandwidth(s, monologue, media); /* print media level attributes */ - print_sdp_media_section(s, media, NULL, flags, rtp_ps_link, true, false, true); + print_sdp_media_section(s, media, NULL, flags, rtp_ps_link, is_active, false, true); + } /**