summaryrefslogtreecommitdiffstats
path: root/src/ctrl
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-19 14:10:59 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-19 14:18:38 +0200
commit2e38d358b6cd450ecf51928f7ae19e56fc6cbb97 (patch)
tree6f34e3026bc90348100761963f8db5199467cd9a /src/ctrl
parentd95f01d204eeec5eaa8f300029cb8f9e92caeee1 (diff)
remove unused function get_rate_ctr_group()
Unused after 22886d9e320ecf734d2827d825a191b977f70d2c "Fix retrieving rate_ctr over control interface" Change-Id: I405367ef6ba5833957778a79dd398ce5ea29307e
Diffstat (limited to 'src/ctrl')
-rw-r--r--src/ctrl/control_if.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index 6d9a9fbb..228fe35f 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -448,43 +448,6 @@ static char *get_all_rate_ctr_in_group(void *ctx, const struct rate_ctr_group *c
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;