pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39758?usp=email )
Change subject: mgw: mdcx: Fix inc of non-existing ctr in mdcx counter group ......................................................................
mgw: mdcx: Fix inc of non-existing ctr in mdcx counter group
Change-Id: If849e3922c7ae864771c41ff7c0fac37ef0280de --- M include/osmocom/mgcp/mgcp_ratectr.h M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_ratectr.c 3 files changed, 4 insertions(+), 2 deletions(-)
Approvals: pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve
diff --git a/include/osmocom/mgcp/mgcp_ratectr.h b/include/osmocom/mgcp/mgcp_ratectr.h index 1e3365b..d013894 100644 --- a/include/osmocom/mgcp/mgcp_ratectr.h +++ b/include/osmocom/mgcp/mgcp_ratectr.h @@ -43,6 +43,7 @@ MGCP_MDCX_FAIL_INVALID_MODE, MGCP_MDCX_FAIL_INVALID_CONN_OPTIONS, MGCP_MDCX_FAIL_NO_REMOTE_CONN_DESC, + MGCP_MDCX_FAIL_BIND_PORT, MGCP_MDCX_FAIL_AVAIL, };
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index e4386b2..bd2120f 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -992,14 +992,14 @@ happen for instance if MGW initially provided an IPv4 during CRCX ACK, and now MDCX tells us the remote has an IPv6 address. */ if (mgcp_get_local_addr(new_local_addr, conn_rtp) < 0) { - rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_CRCX_FAIL_BIND_PORT)); + rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_MDCX_FAIL_BIND_PORT)); goto error3; } if (strcmp(new_local_addr, conn_rtp->end.local_addr)) { osmo_strlcpy(conn_rtp->end.local_addr, new_local_addr, sizeof(conn_rtp->end.local_addr)); mgcp_rtp_end_free_port(&conn_rtp->end); if (mgcp_trunk_allocate_conn_rtp_ports(trunk, conn_rtp) != 0) { - rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_CRCX_FAIL_BIND_PORT)); + rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_MDCX_FAIL_BIND_PORT)); goto error3; } } diff --git a/src/libosmo-mgcp/mgcp_ratectr.c b/src/libosmo-mgcp/mgcp_ratectr.c index 1f06117..6c2c97f 100644 --- a/src/libosmo-mgcp/mgcp_ratectr.c +++ b/src/libosmo-mgcp/mgcp_ratectr.c @@ -93,6 +93,7 @@ [MGCP_MDCX_FAIL_INVALID_CONN_OPTIONS] = { "mdcx:conn_opt", "connection options invalid." }, [MGCP_MDCX_FAIL_NO_REMOTE_CONN_DESC] = { "mdcx:no_remote_conn_desc", "no opposite end specified for connection." }, + [MGCP_MDCX_FAIL_BIND_PORT] = { "mdcx:bind_port", "port bind failure." }, [MGCP_MDCX_FAIL_AVAIL] = { "mdcx:unavailable", "endpoint unavailable." }, };