mirror of https://gerrit.osmocom.org/libosmocore
stats: Move cfg_stats_interval_cmd() function.
cfg_stats_interval_cmd() function was (probably mistakenly) inserted between cfg_stats_reporter_statsd_cmd() and cfg_no_stats_reporter_statsd_cmd() function which makes no sense. Move it below the cfg_no_stats_reporter_log_cmd() to follow the order of the osmo_stats_vty_add_cmds() function calls. Change-Id: I1ecec7025e95cf5ffc21ae3b1c75cf6da8c58de2
This commit is contained in:
parent
3a6bedf1e5
commit
33c703caee
|
@ -269,24 +269,6 @@ DEFUN(cfg_stats_reporter_statsd, cfg_stats_reporter_statsd_cmd,
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN(cfg_stats_interval, cfg_stats_interval_cmd,
|
|
||||||
"stats interval <1-65535>",
|
|
||||||
CFG_STATS_STR "Set the reporting interval\n"
|
|
||||||
"Interval in seconds\n")
|
|
||||||
{
|
|
||||||
int rc;
|
|
||||||
int interval = atoi(argv[0]);
|
|
||||||
rc = osmo_stats_set_interval(interval);
|
|
||||||
if (rc < 0) {
|
|
||||||
vty_out(vty, "%% Unable to set interval: %s%s",
|
|
||||||
strerror(-rc), VTY_NEWLINE);
|
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DEFUN(cfg_no_stats_reporter_statsd, cfg_no_stats_reporter_statsd_cmd,
|
DEFUN(cfg_no_stats_reporter_statsd, cfg_no_stats_reporter_statsd_cmd,
|
||||||
"no stats reporter statsd",
|
"no stats reporter statsd",
|
||||||
NO_STR CFG_STATS_STR CFG_REPORTER_STR "Report to a STATSD server\n")
|
NO_STR CFG_STATS_STR CFG_REPORTER_STR "Report to a STATSD server\n")
|
||||||
|
@ -347,6 +329,23 @@ DEFUN(cfg_no_stats_reporter_log, cfg_no_stats_reporter_log_cmd,
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN(cfg_stats_interval, cfg_stats_interval_cmd,
|
||||||
|
"stats interval <1-65535>",
|
||||||
|
CFG_STATS_STR "Set the reporting interval\n"
|
||||||
|
"Interval in seconds\n")
|
||||||
|
{
|
||||||
|
int rc;
|
||||||
|
int interval = atoi(argv[0]);
|
||||||
|
rc = osmo_stats_set_interval(interval);
|
||||||
|
if (rc < 0) {
|
||||||
|
vty_out(vty, "%% Unable to set interval: %s%s",
|
||||||
|
strerror(-rc), VTY_NEWLINE);
|
||||||
|
return CMD_WARNING;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
DEFUN(show_stats,
|
DEFUN(show_stats,
|
||||||
show_stats_cmd,
|
show_stats_cmd,
|
||||||
"show stats",
|
"show stats",
|
||||||
|
|
Loading…
Reference in New Issue