Change in osmo-msc[master]: add sdp_audio_codec_is_set
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/30108 ) Change subject: add sdp_audio_codec_is_set ...................................................................... add sdp_audio_codec_is_set Change-Id: I078efe5b42367ad1089c53f11f7eb6f3a9dd9443 --- M include/osmocom/msc/sdp_msg.h M src/libmsc/sdp_msg.c 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/08/30108/1 diff --git a/include/osmocom/msc/sdp_msg.h b/include/osmocom/msc/sdp_msg.h index 9073e91..98d1892 100644 --- a/include/osmocom/msc/sdp_msg.h +++ b/include/osmocom/msc/sdp_msg.h @@ -36,6 +36,7 @@ const char *sdp_msg_line_end(const char *src); +bool sdp_audio_codec_is_set(const struct sdp_audio_codec *a); int sdp_audio_codec_cmp(const struct sdp_audio_codec *a, const struct sdp_audio_codec *b, bool cmp_fmtp, bool cmp_payload_type); int sdp_audio_codecs_cmp(const struct sdp_audio_codecs *a, const struct sdp_audio_codecs *b, diff --git a/src/libmsc/sdp_msg.c b/src/libmsc/sdp_msg.c index 09e1277..040d32d 100644 --- a/src/libmsc/sdp_msg.c +++ b/src/libmsc/sdp_msg.c @@ -30,6 +30,11 @@ #include <osmocom/msc/debug.h> #include <osmocom/msc/sdp_msg.h> +bool sdp_audio_codec_is_set(const struct sdp_audio_codec *a) +{ + return a && a->subtype_name[0]; +} + /* Compare name, rate and fmtp, returning typical cmp result: 0 on match, and -1 / 1 on mismatch. * If cmp_fmtp is false, do *not* compare the fmtp string; if true, compare fmtp 1:1 as strings. * If cmp_payload_type is false, do *not* compare the payload_type number. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/30108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I078efe5b42367ad1089c53f11f7eb6f3a9dd9443 Gerrit-Change-Number: 30108 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
neels