aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty
diff options
context:
space:
mode:
Diffstat (limited to 'src/vty')
-rw-r--r--src/vty/logging_vty.c8
-rw-r--r--src/vty/tdef_vty.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index 6d908d9e..c51b4373 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -351,18 +351,18 @@ DEFUN(logging_level,
int category = log_parse_category(argv[0]);
int level = log_parse_level(argv[1]);
- ACQUIRE_VTY_LOG_TGT_WITH_LOCK(vty, tgt);
-
if (level < 0) {
vty_out(vty, "Invalid level `%s'%s", argv[1], VTY_NEWLINE);
- RET_WITH_UNLOCK(CMD_WARNING);
+ return CMD_WARNING;
}
if (category < 0) {
vty_out(vty, "Invalid category `%s'%s", argv[0], VTY_NEWLINE);
- RET_WITH_UNLOCK(CMD_WARNING);
+ return CMD_WARNING;
}
+ ACQUIRE_VTY_LOG_TGT_WITH_LOCK(vty, tgt);
+
tgt->categories[category].enabled = 1;
tgt->categories[category].loglevel = level;
diff --git a/src/vty/tdef_vty.c b/src/vty/tdef_vty.c
index 4549a61c..fe6d48ba 100644
--- a/src/vty/tdef_vty.c
+++ b/src/vty/tdef_vty.c
@@ -361,10 +361,10 @@ static char *timer_doc_string(const char *prefix, const char *suffix)
* The given timer definitions group is stored in a global pointer, so this can be done only once per main() scope.
* It would also be possible to have distinct timer groups on separate VTY subnodes, with a "manual" implementation, but
* not with this API.
- * \param[in] parent_node VTY node id at which to add the timer group commands, e.g. CONFIG_NODE.
+ * \param[in] parent_cfg_node VTY node at which to add the timer configuration commands, e.g. CONFIG_NODE.
* \param[in] groups Global timer groups definition.
*/
-void osmo_tdef_vty_groups_init(enum node_type parent_node, struct osmo_tdef_group *groups)
+void osmo_tdef_vty_groups_init(unsigned int parent_cfg_node, struct osmo_tdef_group *groups)
{
struct osmo_tdef_group *g;
OSMO_ASSERT(!global_tdef_groups);
@@ -380,7 +380,7 @@ void osmo_tdef_vty_groups_init(enum node_type parent_node, struct osmo_tdef_grou
cfg_timer_cmd.doc = timer_doc_string("Configure or show timers\n", OSMO_TDEF_VTY_DOC_SET);
install_element_ve(&show_timer_cmd);
- install_element(parent_node, &cfg_timer_cmd);
+ install_element(parent_cfg_node, &cfg_timer_cmd);
}
/*! Write the global osmo_tdef_group configuration to VTY, as previously passed to osmo_tdef_vty_groups_init().