From 9903b413c5829bddd60a74ec67fd4cfe38f22625 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 19 Sep 2024 09:50:53 -0400 Subject: [PATCH] MT#55283 split up sdp_attr_append_other() No-op. Change-Id: I999a6733ddbb18380568164d04a49539dd4421e2 --- daemon/sdp.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/daemon/sdp.c b/daemon/sdp.c index 839ab6cc8..775b8f08a 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -1813,16 +1813,22 @@ void sdp_orig_free(sdp_origin *o) { g_slice_free1(sizeof(*o), o); } -// Duplicate all OTHER attributes from the source (parsed SDP attributes list) into +// Duplicate all attributes from the source (parsed SDP attributes list) into // the destination (string-format attribute list) -static void sdp_attr_append_other(sdp_attr_q *dst, struct sdp_attributes *src) { - __auto_type attrs = attr_list_get_by_id(src, ATTR_OTHER); +static void sdp_attr_append(sdp_attr_q *dst, attributes_q *attrs) { + if (!attrs) + return; for (__auto_type ll = attrs ? attrs->head : NULL; ll; ll = ll->next) { __auto_type attr = ll->data; struct sdp_attr *ac = sdp_attr_dup(attr); t_queue_push_tail(dst, ac); } } +// Duplicate all OTHER attributes from the source (parsed SDP attributes list) into +// the destination (string-format attribute list) +static void sdp_attr_append_other(sdp_attr_q *dst, struct sdp_attributes *src) { + sdp_attr_append(dst, attr_list_get_by_id(src, ATTR_OTHER)); +} /* XXX split this function up */ int sdp_streams(const sdp_sessions_q *sessions, sdp_streams_q *streams, sdp_ng_flags *flags) {