summaryrefslogtreecommitdiffstats
path: root/src/shared/libosmocore/src/vty/vty.c
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2011-11-13 20:24:49 +0100
committerSylvain Munaut <tnt@246tNt.com>2011-11-13 20:24:49 +0100
commit6d06f6b9db7a8c8a011d957796a3e22cd46457c7 (patch)
tree5094df77de0df433dd39482f7cb1ce0c3105429c /src/shared/libosmocore/src/vty/vty.c
parent4789b4a6627b452041b57f81ea91878de666bcc2 (diff)
parenta71b8eaca7eed4dfc96f2cebabfc26430416c2e9 (diff)
Merge commit 'a71b8eaca7eed4dfc96f2cebabfc26430416c2e9'
Diffstat (limited to 'src/shared/libosmocore/src/vty/vty.c')
-rw-r--r--src/shared/libosmocore/src/vty/vty.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/shared/libosmocore/src/vty/vty.c b/src/shared/libosmocore/src/vty/vty.c
index 5f5e6a4c..da035969 100644
--- a/src/shared/libosmocore/src/vty/vty.c
+++ b/src/shared/libosmocore/src/vty/vty.c
@@ -802,9 +802,11 @@ static void vty_backward_word(struct vty *vty)
static void vty_down_level(struct vty *vty)
{
vty_out(vty, "%s", VTY_NEWLINE);
- /* FIXME: we need to call the exit function of the specific node
- * in question, not this generic one that doesn't know all nodes */
- (*config_exit_cmd.func) (NULL, vty, 0, NULL);
+ /* call the exit function of the specific node */
+ if (vty->node > CONFIG_NODE)
+ vty_go_parent(vty);
+ else
+ (*config_exit_cmd.func) (NULL, vty, 0, NULL);
vty_prompt(vty);
vty->cp = 0;
}