Change in libosmo-abis[master]: Use new stat item/ctr getter APIs

pespin gerrit-no-reply at lists.osmocom.org
Fri Jun 4 15:53:41 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/24553 )


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: I064aae995975a379425d5f21221fa48efc6d05f9
---
M src/input/dahdi.c
1 file changed, 5 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/53/24553/1

diff --git a/src/input/dahdi.c b/src/input/dahdi.c
index cdaa8eb..6dee0d7 100644
--- a/src/input/dahdi.c
+++ b/src/input/dahdi.c
@@ -146,23 +146,23 @@
 	case DAHDI_EVENT_ALARM:
 		/* we should notify the code that the line is gone */
 		osmo_signal_dispatch(SS_L_INPUT, S_L_INP_LINE_ALARM, &isd);
-		rate_ctr_inc(&line->rate_ctr->ctr[E1I_CTR_ALARM]);
+		rate_ctr_inc(rate_ctr_group_get_ctr(line->rate_ctr, E1I_CTR_ALARM));
 		break;
 	case DAHDI_EVENT_NOALARM:
 		/* alarm has gone, we should re-start the SABM requests */
 		osmo_signal_dispatch(SS_L_INPUT, S_L_INP_LINE_NOALARM, &isd);
 		break;
 	case DAHDI_EVENT_ABORT:
-		rate_ctr_inc(&line->rate_ctr->ctr[E1I_CTR_HDLC_ABORT]);
+		rate_ctr_inc(rate_ctr_group_get_ctr(line->rate_ctr, E1I_CTR_HDLC_ABORT));
 		break;
 	case DAHDI_EVENT_OVERRUN:
-		rate_ctr_inc(&line->rate_ctr->ctr[E1I_CTR_HDLC_OVERR]);
+		rate_ctr_inc(rate_ctr_group_get_ctr(line->rate_ctr, E1I_CTR_HDLC_OVERR));
 		break;
 	case DAHDI_EVENT_BADFCS:
-		rate_ctr_inc(&line->rate_ctr->ctr[E1I_CTR_HDLC_BADFCS]);
+		rate_ctr_inc(rate_ctr_group_get_ctr(line->rate_ctr, E1I_CTR_HDLC_BADFCS));
 		break;
 	case DAHDI_EVENT_REMOVED:
-		rate_ctr_inc(&line->rate_ctr->ctr[E1I_CTR_REMOVED]);
+		rate_ctr_inc(rate_ctr_group_get_ctr(line->rate_ctr, E1I_CTR_REMOVED));
 		break;
 	}
 }

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/24553
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I064aae995975a379425d5f21221fa48efc6d05f9
Gerrit-Change-Number: 24553
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210604/d76a05c6/attachment.htm>


More information about the gerrit-log mailing list