From 82dfb505dba2cba92985ee234492d8acad960218 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 19 Jan 2023 14:27:17 +0100 Subject: [PATCH] mgcp_network: improve coment the comment that explains the AMR frame format check is a bit difficult to understand, lets rephrase it. Change-Id: I07f12c03449e1e8eda8bdd3edad6d1007f5ba48d --- src/libosmo-mgcp/mgcp_network.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index d93e6954f..d6028a237 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1537,12 +1537,11 @@ static int rx_rtp(struct msgb *msg) if (!trunk->rtp_accept_all && check_rtp_origin(conn_src, from_addr)) return -1; - /* If AMR is configured for the ingress connection and conversion of the - * framing mode (octet-aligned vs. bandwith-efficient) is explicitly - * defined, then we check if the incoming payload matches that - * expectation. */ + /* Handle AMR frame format conversion (octet-aligned vs. bandwith-efficient) */ if (mc->proto == MGCP_PROTO_RTP && mgcp_codec_amr_align_mode_is_indicated(conn_src->end.codec)) { + /* Make sure that the incoming AMR frame format matches the frame format that the call agent has + * communicated via SDP when the connection was created/modfied. */ int oa = amr_oa_check((char*)msgb_data(msg), msgb_length(msg)); if (oa < 0) return -1;