laforge submitted this change.
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(-)
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 change 38002. To unsubscribe, or for help writing mail filters, visit settings.