lib: Consolidate VIEW_NODE to be ENABLE_NODE as well

If you are in VIEW_NODE, the command should exist in ENABLE_NODE
as well.  This is being done to reduce chances of code being
added to one but not the other NODE.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2016-03-11 14:27:12 -05:00
parent 3c8ab49fd1
commit 735e62a0f2

View File

@ -718,6 +718,9 @@ install_element (enum node_type ntype, struct cmd_element *cmd)
vector_set (cnode->cmd_vector, cmd);
if (cmd->tokens == NULL)
cmd->tokens = cmd_parse_format(cmd->string, cmd->doc);
if (ntype == VIEW_NODE)
install_element (ENABLE_NODE, cmd);
}
static const unsigned char itoa64[] =