From 2e38d358b6cd450ecf51928f7ae19e56fc6cbb97 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 19 Sep 2016 14:10:59 +0200 Subject: remove unused function get_rate_ctr_group() Unused after 22886d9e320ecf734d2827d825a191b977f70d2c "Fix retrieving rate_ctr over control interface" Change-Id: I405367ef6ba5833957778a79dd398ce5ea29307e --- src/ctrl/control_if.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'src') 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; -- cgit v1.2.3