[PATCH] libosmocore[master]: remove unused function get_rate_ctr_group()

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Sep 19 12:19:11 UTC 2016


Review at  https://gerrit.osmocom.org/859

remove unused function get_rate_ctr_group()

Unused after 22886d9e320ecf734d2827d825a191b977f70d2c
"Fix retrieving rate_ctr over control interface"

Change-Id: I405367ef6ba5833957778a79dd398ce5ea29307e
---
M src/ctrl/control_if.c
1 file changed, 0 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/859/1

diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index 6d9a9fb..228fe35 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -448,43 +448,6 @@
 	return counters;
 }
 
-static int get_rate_ctr_group(const char *ctr_group, int intv, struct ctrl_cmd *cmd)
-{
-	int i;
-	char *counters;
-	struct rate_ctr_group *ctrg;
-
-	cmd->reply = talloc_asprintf(cmd, "All counters in group %s", ctr_group);
-	if (!cmd->reply)
-		goto oom;
-
-	for (i=0;;i++) {
-		ctrg = rate_ctr_get_group_by_name_idx(ctr_group, i);
-		if (!ctrg)
-			break;
-
-		counters = get_all_rate_ctr_in_group(cmd, ctrg, intv);
-		if (!counters)
-			goto oom;
-
-		cmd->reply = talloc_asprintf_append(cmd->reply, "%s", counters);
-		talloc_free(counters);
-		if (!cmd->reply)
-			goto oom;
-	}
-
-	/* We found no counter group by that name */
-	if (i == 0) {
-		cmd->reply = talloc_asprintf(cmd, "No counter group with name %s.", ctr_group);
-		return CTRL_CMD_ERROR;
-	}
-
-	return CTRL_CMD_REPLY;
-oom:
-	cmd->reply = "OOM.";
-	return CTRL_CMD_ERROR;
-}
-
 static int get_rate_ctr_group_idx(const struct rate_ctr_group *ctrg, int intv, struct ctrl_cmd *cmd)
 {
 	char *counters;

-- 
To view, visit https://gerrit.osmocom.org/859
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I405367ef6ba5833957778a79dd398ce5ea29307e
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list