aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2024-01-30 06:03:42 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2024-02-09 05:17:39 +0100
commit45b0d2cf686682879d350ba7ef3b993c075bd1cf (patch)
tree99069d83cc64f78ae5e699161c2738700393ea48
parenta53177098f4ca428a6bbad0ab6e5db0271885e9f (diff)
fully use new AMR fmtp matching
Enable fmtp matching in sdp_audio_codecs_by_descr(). This has profound effects on the codec_filter and other loops that collect codec matches. By properly matching the meaning of fmtp, msc_vlr_test_call.c now works as expected: all AMR variants are picked up properly. Adjust expectations. Change-Id: I63dc27e76243074ae0f019d219cae4412d322a84
-rw-r--r--src/libmsc/sdp_msg.c2
-rw-r--r--tests/msc_vlr/msc_vlr_test_call.c17
2 files changed, 7 insertions, 12 deletions
diff --git a/src/libmsc/sdp_msg.c b/src/libmsc/sdp_msg.c
index c8efa4227..c6869d8ac 100644
--- a/src/libmsc/sdp_msg.c
+++ b/src/libmsc/sdp_msg.c
@@ -281,7 +281,7 @@ struct sdp_audio_codec *sdp_audio_codecs_by_descr(struct sdp_audio_codecs *ac, c
{
struct sdp_audio_codec *i;
sdp_audio_codecs_foreach(i, ac) {
- if (!sdp_audio_codec_cmp(i, codec, false, false))
+ if (!sdp_audio_codec_cmp(i, codec, true, false))
return i;
}
return NULL;
diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c
index 230b9fdc6..312d1d947 100644
--- a/tests/msc_vlr/msc_vlr_test_call.c
+++ b/tests/msc_vlr/msc_vlr_test_call.c
@@ -871,32 +871,27 @@ struct codec_test {
LIST_END \
}
-
-/* EXPECTED FAILURE: These entries are currently missing until upcoming patches are merged:
+#define SDP_CODECS_ALL_GSM \
+ { \
+ "AMR:octet-align=1;mode-set=0,2,4,7#112", \
"AMR:octet-align=1;mode-set=7#114", \
"AMR:octet-align=1;mode-set=0,2,4#115", \
"AMR:mode-set=0,2,4,7#116", \
"AMR:mode-set=7#117", \
"AMR:mode-set=0,2,4#118", \
-*/
-#define SDP_CODECS_ALL_GSM \
- { \
- "AMR:octet-align=1;mode-set=0,2,4,7#112", \
"GSM-EFR#110", \
"GSM#3", \
"GSM-HR-08#111", \
}
-/* EXPECTED FAILURE: These entries are currently missing until upcoming patches are merged:
+#define SDP_CODECS_ALL_GSM_WITH_ODD_PT_NRS \
+ { \
+ "AMR:octet-align=1;mode-set=0,2,4,7#127", \
"AMR:octet-align=1;mode-set=7#126", \
"AMR:octet-align=1;mode-set=0,2,4#125", \
"AMR:mode-set=0,2,4,7#124", \
"AMR:mode-set=7#123", \
"AMR:mode-set=0,2,4#122", \
-*/
-#define SDP_CODECS_ALL_GSM_WITH_ODD_PT_NRS \
- { \
- "AMR:octet-align=1;mode-set=0,2,4,7#127", \
"GSM-EFR#110", \
"GSM#3", \
"GSM-HR-08#111", \