[PATCH] vty: bail out if we cannot enable logging from VTY
30 Aug
2011
30 Aug
'11
2:48 p.m.
From: Pablo Neira Ayuso <pablo@gnumonks.org> --- src/vty/logging_vty.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index b037a5b..b4ab748 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -78,8 +78,10 @@ DEFUN(enable_logging, } conn->dbg = log_target_create_vty(vty); - if (!conn->dbg) + if (!conn->dbg) { + vty_out(vty, "Cannot enable logging to this VTY.%s", VTY_NEWLINE); return CMD_WARNING; + } log_add_target(conn->dbg); return CMD_SUCCESS; -- 1.7.2.5
5561
Age (days ago)
5561
Last active (days ago)
0 comments
1 participants
participants (1)
-
pablo@gnumonks.org