From e7f478d8793f26015f729fbab64473f1c2348256 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Fri, 13 Sep 2024 13:46:41 +0200 Subject: [PATCH] MT#56465 sdp_create: keep `s=` empty if it is indeed Just keep the `s=` attribute empty, if it is coming like that in the message being processed. Current behavior of the sdp_create approach just inserts the `rtpe_config.software_id`, which is wrong. Change-Id: I1235081b90786f5d9480fd1cad9f2751c60e7720 --- daemon/sdp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/daemon/sdp.c b/daemon/sdp.c index 11a4a6673..7e0c4b5f6 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -3577,8 +3577,13 @@ static void sdp_out_add_session_name(GString *out, struct call_monologue *monolo * but try the one of the subscription, because the given monologue itself * has likely no session attributes set yet */ struct media_subscription *ms = call_get_top_media_subscription(monologue); - if (ms && ms->monologue && ms->monologue->sdp_session_name) - sdp_session_name = ms->monologue->sdp_session_name; + if (ms && ms->monologue) + { + /* if a session name was empty in the s= attr of the coming message, + * while processing this ml in `__call_monologue_init_from_flags()`, + * then just keep it empty. */ + sdp_session_name = (ms->monologue->sdp_session_name) ? : ""; + } g_string_append_printf(out, "s=%s\r\n", sdp_session_name); }