MT#55283 introduce sdp_attr_append1

Helper function to append just one attribute

No-op.

Change-Id: I6076760250af4b7d5fe7f7490210e8f9c43f0d22
pull/1897/head
Richard Fuchs 4 months ago
parent 8375ce6c51
commit 02a2dc1fac

@ -1783,16 +1783,19 @@ void sdp_orig_free(sdp_origin *o) {
g_slice_free1(sizeof(*o), o); g_slice_free1(sizeof(*o), o);
} }
static void sdp_attr_append1(sdp_attr_q *dst, const struct sdp_attribute *attr) {
if (!attr)
return;
struct sdp_attr *ac = sdp_attr_dup(attr);
t_queue_push_tail(dst, ac);
}
// Duplicate all 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) // the destination (string-format attribute list)
static void sdp_attr_append(sdp_attr_q *dst, attributes_q *attrs) { static void sdp_attr_append(sdp_attr_q *dst, attributes_q *attrs) {
if (!attrs) if (!attrs)
return; return;
for (__auto_type ll = attrs->head; ll; ll = ll->next) { for (__auto_type ll = attrs->head; ll; ll = ll->next)
__auto_type attr = ll->data; sdp_attr_append1(dst, 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 // Duplicate all OTHER attributes from the source (parsed SDP attributes list) into
// the destination (string-format attribute list) // the destination (string-format attribute list)

Loading…
Cancel
Save