Merge pull request #1833 from opensourcerouting/fix-vtysh-output-init

vtysh: initialize vty structure correctly for output to terminal
This commit is contained in:
Quentin Young 2018-03-06 11:47:47 -05:00 committed by GitHub
commit ce08776d95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -539,7 +539,7 @@ int vtysh_mark_file(const char *filename)
}
vty = vty_new();
vty->fd = 0; /* stdout */
vty->wfd = STDERR_FILENO;
vty->type = VTY_TERM;
vty->node = CONFIG_NODE;

View File

@ -398,7 +398,7 @@ static int vtysh_read_file(FILE *confp)
int ret;
vty = vty_new();
vty->fd = 0; /* stdout */
vty->wfd = STDERR_FILENO;
vty->type = VTY_TERM;
vty->node = CONFIG_NODE;