pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/30687 ) Change subject: iuup: Use osmo_amr_ft_valid() API ...................................................................... iuup: Use osmo_amr_ft_valid() API This is the only user outside libosmo-abis using this define, which meaning is not clear at all. Let's simply use the related API to clearly check the FT. Related: SYS#6161 Change-Id: I40c7ed2e7f6a99a33b467734e33acf3d5befac0d --- M src/libosmo-mgcp/mgcp_iuup.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve daniel: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_iuup.c b/src/libosmo-mgcp/mgcp_iuup.c index 9779692..6ad62c8 100644 --- a/src/libosmo-mgcp/mgcp_iuup.c +++ b/src/libosmo-mgcp/mgcp_iuup.c @@ -672,7 +672,7 @@ "Bridge RTP=>IuUP: too short for AMR OA hdr (%u)\n", msgb_length(msg)); goto free_ret; } - if (amr_hdr->ft >= AMR_FT_MAX) { + if (!osmo_amr_ft_valid(amr_hdr->ft)) { LOG_CONN_RTP(conn_src_rtp, LOGL_NOTICE, "Bridge RTP=>IuUP: wrong AMR OA ft=%u\n", amr_hdr->ft); goto free_ret; } @@ -695,7 +695,7 @@ goto free_ret; } ft = ((amr_bwe_hdr[0] & 0x07) << 1) | ((amr_bwe_hdr[1] & 0x80) >> 7); - if (ft >= AMR_FT_MAX) { + if (!osmo_amr_ft_valid(ft)) { LOG_CONN_RTP(conn_src_rtp, LOGL_NOTICE, "Bridge RTP=>IuUP: wrong AMR BE ft=%u\n", ft); goto free_ret; } -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/30687 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I40c7ed2e7f6a99a33b467734e33acf3d5befac0d Gerrit-Change-Number: 30687 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged