Change in libosmocore[master]: Revert "Print error message if application fails to call rate_ctr_ini...

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri May 10 09:53:09 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13962


Change subject: Revert "Print error message if application fails to call rate_ctr_init()"
......................................................................

Revert "Print error message if application fails to call rate_ctr_init()"

This reverts commit 9685a48c7bc83b1f5ee9b51e29419164b387ade2 which has
caused massive fall-out among (particularly) unit tests in osmo-{msc,bts,pcu}.

Change-Id: Iede72e86451d94cf678045992cb71f6b1bf16896
---
M src/rate_ctr.c
1 file changed, 2 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/13962/1

diff --git a/src/rate_ctr.c b/src/rate_ctr.c
index 99ec523..026670b 100644
--- a/src/rate_ctr.c
+++ b/src/rate_ctr.c
@@ -69,7 +69,7 @@
 #include <osmocom/core/logging.h>
 
 static LLIST_HEAD(rate_ctr_groups);
-static struct osmo_timer_list rate_ctr_timer;
+
 static void *tall_rate_ctr_ctx;
 
 
@@ -217,10 +217,6 @@
 	unsigned int size;
 	struct rate_ctr_group *group;
 
-	if (!osmo_timer_pending(&rate_ctr_timer))
-		LOGP(DLGLOBAL, LOGL_ERROR, "your program appears to use libosmocore rate_ctr "
-			"without calling rate_ctr_init() at start-up. Rate counters won't work!\n");
-
 	if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) {
 		unsigned int new_idx = rate_ctr_get_unused_name_idx(desc->group_name_prefix);
 		LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists for index %u,"
@@ -298,6 +294,7 @@
 		ctr->intv[intv+1].rate += ctr->intv[intv].rate;
 }
 
+static struct osmo_timer_list rate_ctr_timer;
 static uint64_t timer_ticks;
 
 /* The one-second interval has expired */

-- 
To view, visit https://gerrit.osmocom.org/13962
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iede72e86451d94cf678045992cb71f6b1bf16896
Gerrit-Change-Number: 13962
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190510/cdcdde53/attachment.html>


More information about the gerrit-log mailing list