From 0e23551fbc7d08c19dae897d2805be5e9ee732d1 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 15 Jan 2024 10:00:54 -0500 Subject: [PATCH] MT#55283 add distinctions to OTHER attrs All OTHER attributes are printed verbatim as strings, but we still want to be able to distinguish between different types of them. Introduce an extra enum for that purpose. Change-Id: I24351c26a45ffbbe1dec9299faa5d0ea65cada29 --- daemon/sdp.c | 2 ++ include/sdp.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/daemon/sdp.c b/daemon/sdp.c index a83738cdb..001502540 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -292,6 +292,7 @@ struct sdp_attribute { int i; struct attribute_t38faxudpecdepth t38faxudpecdepth; struct attribute_t38faxratemanagement t38faxratemanagement; + enum sdp_attr_type other; }; }; @@ -1768,6 +1769,7 @@ static struct sdp_attr *sdp_attr_dup(const struct sdp_attribute *c) { str_init_dup_str(&ac->strs.name, &c->strs.name); str_init_dup_str(&ac->strs.value, &c->strs.value); + ac->type = c->other; return ac; } diff --git a/include/sdp.h b/include/sdp.h index c05c42b8d..f282db032 100644 --- a/include/sdp.h +++ b/include/sdp.h @@ -34,8 +34,13 @@ struct sdp_attribute_strs { str key; /* "rtpmap:8" */ }; +enum sdp_attr_type { + SDP_ATTR_TYPE_UNKNOWN = 0, +}; + struct sdp_attr { struct sdp_attribute_strs strs; + enum sdp_attr_type type; };