From fb63438bd32d81616ccf91f3f617df5a98046f9f Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Tue, 1 Oct 2024 21:10:01 +0200 Subject: [PATCH] MT#60476 For non-accepted medias print `c=` before all Print the `c=` attribute before all other attributes. Additionally: fix tests accordingly. Change-Id: I338a84d79ed9d7045bcfd0f07a40a16b986d2fcc (cherry picked from commit 1969ac61c8945f5aa34238a3f60797f3b90f3f5f) --- daemon/sdp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/sdp.c b/daemon/sdp.c index 2f1ebbbd8..cf37f7bd5 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -3830,6 +3830,9 @@ void handle_sdp_media_attributes(GString *s, struct call_media *media, /* add attributes and connection information only when audio is accepted */ if (!address || !address->port || !rtp_ps->selected_sfd) { + /* print zeroed address for the non accepted media, see RFC 3264 */ + sdp_out_add_media_connection(s, media, rtp_ps, NULL, flags); + /* just add the mid before finalizing (see #1361 and #1362). * TODO: after the content of this func is moved to the `print_sdp_media_section()` * just move this logic there as well. @@ -3837,9 +3840,6 @@ void handle_sdp_media_attributes(GString *s, struct call_media *media, if (media->media_id.s) append_attr_to_gstring(s, "mid", &media->media_id, flags, media->type_id); - /* print zeroed address for the non accepted media, see RFC 3264 */ - sdp_out_add_media_connection(s, media, rtp_ps, NULL, flags); - return; }