laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/38002?usp=email )

Change subject: Revert "hnb_persistent: Use incrementing counter for rate_ctr + 
stat_item index"
......................................................................

Revert "hnb_persistent: Use incrementing counter for rate_ctr + stat_item index"

This reverts commit 61e278a452bf4fd240e45f1fe8c094a4b3795317 as it
created errors in our test suite.  Let's live with the cosmetic error
message but have working tests instead.  We should probably consider
removing the printing of the message from libosmocore, at least in case
the counters also have names set?

Closes: OS#6557
Change-Id: I2f7d3f3c88775e2926661e4760ec1d8723c0400c
---
M src/osmo-hnbgw/hnbgw.c
1 file changed, 2 insertions(+), 5 deletions(-)

Approvals:
  neels: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c
index 90b8147..d4515a8 100644
--- a/src/osmo-hnbgw/hnbgw.c
+++ b/src/osmo-hnbgw/hnbgw.c
@@ -497,22 +497,19 @@
        osmo_timer_schedule(&hnbp->disconnected_timeout, period_s, 0);
 }

-static unsigned int g_hnbp_ctr_id;
-
 struct hnb_persistent *hnb_persistent_alloc(const struct umts_cell_id *id)
 {
        struct hnb_persistent *hnbp = talloc_zero(g_hnbgw, struct 
hnb_persistent);
-       unsigned int ctr_id = g_hnbp_ctr_id++;
        if (!hnbp)
                return NULL;

        hnbp->id = *id;
        hnbp->id_str = talloc_strdup(hnbp, umts_cell_id_to_str(id));
-       hnbp->ctrs = rate_ctr_group_alloc(hnbp, &hnb_ctrg_desc, ctr_id);
+       hnbp->ctrs = rate_ctr_group_alloc(hnbp, &hnb_ctrg_desc, 0);
        if (!hnbp->ctrs)
                goto out_free;
        rate_ctr_group_set_name(hnbp->ctrs, hnbp->id_str);
-       hnbp->statg = osmo_stat_item_group_alloc(hnbp, &hnb_statg_desc, ctr_id);
+       hnbp->statg = osmo_stat_item_group_alloc(hnbp, &hnb_statg_desc, 0);
        if (!hnbp->statg)
                goto out_free_ctrs;
        osmo_stat_item_group_set_name(hnbp->statg, hnbp->id_str);

--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/38002?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I2f7d3f3c88775e2926661e4760ec1d8723c0400c
Gerrit-Change-Number: 38002
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: neels <[email protected]>
Gerrit-CC: pespin <[email protected]>

Reply via email to