summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorhasso <hasso>2004-10-13 08:18:07 +0000
committerhasso <hasso>2004-10-13 08:18:07 +0000
commitddd85ed1af88068939cee36a43125ff8ad50cf79 (patch)
treed47785fc08f730fb92afa98800ce492148fb32dd /lib/command.c
parent42d498658d85e36a7e5910955e7425b1fa2afa69 (diff)
Fix critical bugzilla #113. Make CMD_ERR_NOTHING_TODO nonfatal.
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/command.c b/lib/command.c
index 0e61e0d8..4495d221 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2238,15 +2238,16 @@ config_from_file (struct vty *vty, FILE *fp)
/* Try again with setting node to CONFIG_NODE */
while (ret != CMD_SUCCESS && ret != CMD_WARNING
- && vty->node != CONFIG_NODE)
- {
+ && ret != CMD_ERR_NOTHING_TODO && vty->node != CONFIG_NODE)
+ {
vty->node = node_parent(vty->node);
- ret = cmd_execute_command_strict (vline, vty, NULL);
- }
+ ret = cmd_execute_command_strict (vline, vty, NULL);
+ }
cmd_free_strvec (vline);
- if (ret != CMD_SUCCESS && ret != CMD_WARNING)
+ if (ret != CMD_SUCCESS && ret != CMD_WARNING
+ && ret != CMD_ERR_NOTHING_TODO)
return ret;
}
return CMD_SUCCESS;