Change in osmo-smlc[master]: Use new stat item/ctr getter APIs

laforge gerrit-no-reply at lists.osmocom.org
Fri Jun 4 19:38:25 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-smlc/+/24560 )

Change subject: Use new stat item/ctr getter APIs
......................................................................

Use new stat item/ctr getter APIs

Generated with spatch:
"""
@@
expression E1, E2;
@@
- &E2->ctr[E1]
+ rate_ctr_group_get_ctr(E2, E1)
"""

Change-Id: I594c08b8fe0ed54a31353d8c6c911cc7293ae7c0
---
M src/osmo-smlc/sccp_lb_inst.c
M src/osmo-smlc/smlc_loc_req.c
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/osmo-smlc/sccp_lb_inst.c b/src/osmo-smlc/sccp_lb_inst.c
index 5a5c5e9..1e325f5 100644
--- a/src/osmo-smlc/sccp_lb_inst.c
+++ b/src/osmo-smlc/sccp_lb_inst.c
@@ -186,14 +186,14 @@
 {
 	int rc;
 	if (!sli->scu) {
-		rate_ctr_inc(&g_smlc->ctrs->ctr[SMLC_CTR_BSSMAP_LE_TX_ERR_CONN_NOT_READY]);
+		rate_ctr_inc(rate_ctr_group_get_ctr(g_smlc->ctrs, SMLC_CTR_BSSMAP_LE_TX_ERR_CONN_NOT_READY));
 		return -EIO;
 	}
 	rc = osmo_sccp_user_sap_down_nofree(sli->scu, oph);
 	if (rc >= 0)
-		rate_ctr_inc(&g_smlc->ctrs->ctr[SMLC_CTR_BSSMAP_LE_TX_SUCCESS]);
+		rate_ctr_inc(rate_ctr_group_get_ctr(g_smlc->ctrs, SMLC_CTR_BSSMAP_LE_TX_SUCCESS));
 	else
-		rate_ctr_inc(&g_smlc->ctrs->ctr[SMLC_CTR_BSSMAP_LE_TX_ERR_SEND]);
+		rate_ctr_inc(rate_ctr_group_get_ctr(g_smlc->ctrs, SMLC_CTR_BSSMAP_LE_TX_ERR_SEND));
 	return rc;
 }
 
diff --git a/src/osmo-smlc/smlc_loc_req.c b/src/osmo-smlc/smlc_loc_req.c
index 1365bfa..392e247 100644
--- a/src/osmo-smlc/smlc_loc_req.c
+++ b/src/osmo-smlc/smlc_loc_req.c
@@ -96,7 +96,7 @@
 {
 	struct smlc_loc_req *smlc_loc_req;
 
-	rate_ctr_inc(&g_smlc->ctrs->ctr[SMLC_CTR_BSSMAP_LE_RX_DT1_PERFORM_LOCATION_REQUEST]);
+	rate_ctr_inc(rate_ctr_group_get_ctr(g_smlc->ctrs, SMLC_CTR_BSSMAP_LE_RX_DT1_PERFORM_LOCATION_REQUEST));
 
 	if (lb_conn->smlc_loc_req) {
 		/* Another request is already pending. If we send Perform Location Abort, the peer doesn't know which

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-smlc/+/24560
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-smlc
Gerrit-Branch: master
Gerrit-Change-Id: I594c08b8fe0ed54a31353d8c6c911cc7293ae7c0
Gerrit-Change-Number: 24560
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210604/8fea6565/attachment.htm>


More information about the gerrit-log mailing list