This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: rate_ctr: print proper error message if rate_ctr already exists
......................................................................
rate_ctr: print proper error message if rate_ctr already exists
Change-Id: I86b7ccb0931f5a2a489bb8c7c6aee0894a126eb8
---
M src/rate_ctr.c
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/rate_ctr.c b/src/rate_ctr.c
index c27ac68..72c6bb1 100644
--- a/src/rate_ctr.c
+++ b/src/rate_ctr.c
@@ -190,8 +190,11 @@
unsigned int size;
struct rate_ctr_group *group;
- if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx))
+ if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) {
+ LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists for index %u\n",
+ desc->group_name_prefix, idx);
return NULL; /* group already exist */
+ }
size = sizeof(struct rate_ctr_group) +
desc->num_ctr * sizeof(struct rate_ctr);
--
To view, visit https://gerrit.osmocom.org/5484
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I86b7ccb0931f5a2a489bb8c7c6aee0894a126eb8
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder