From 9ce741daeeffdd228d8d0b4c7ed45493cb164d62 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 10 Jan 2024 16:40:35 -0500 Subject: [PATCH] MT#55283 abbreviate append_attr_int_to_gstring() ... in terms of append_int_tagged_attr_to_gstring() as one is now a subset of the other. Change-Id: I20d5e9e4013278679515a0fe2a850e65c47b1f70 --- daemon/sdp.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/daemon/sdp.c b/daemon/sdp.c index 2f1a7af7f..3c8739797 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -2977,27 +2977,8 @@ static void append_int_tagged_attr_to_gstring(GString *s, const char * name, uns static void append_attr_int_to_gstring(GString *s, const char * name, const int value, sdp_ng_flags *flags, enum media_type media_type) { - struct sdp_manipulations *sdp_manipulations = sdp_manipulations_get_by_id(flags, media_type); - - str attr = STR_INIT(name); - str * attr_subst = sdp_manipulations_subst(sdp_manipulations, &attr); - - /* first check if the originally present attribute is to be removed */ - if (sdp_manipulate_remove(sdp_manipulations, &attr)) - return; - - /* then, if there remains something to be substituted, do that */ - if (attr_subst) - attr = *attr_subst; - /* attr name */ - g_string_append_printf(s, "a=" STR_FORMAT, STR_FMT(&attr)); - - /* attr value, don't add if substituion presented */ - if (value && !attr_subst) - g_string_append_printf(s, "%i", value); - - g_string_append(s, "\r\n"); + append_int_tagged_attr_to_gstring(s, name, value, NULL, flags, media_type); } struct packet_stream *print_rtcp(GString *s, struct call_media *media, packet_stream_list *rtp_ps_link, @@ -3098,7 +3079,7 @@ static struct packet_stream *print_sdp_media_section(GString *s, struct call_med insert_dtls(s, media, dtls_ptr(rtp_ps->selected_sfd), flags); if (media->ptime) - append_attr_int_to_gstring(s, "ptime:", media->ptime, flags, + append_attr_int_to_gstring(s, "ptime", media->ptime, flags, media->type_id); }