diff options
author | Chris Hall <chris.hall@highwayman.com> | 2011-03-29 19:47:32 +0100 |
---|---|---|
committer | Chris Hall <chris.hall@highwayman.com> | 2011-03-29 19:47:32 +0100 |
commit | 9c99076cf33bfa874db34151e28822f0e392ab3a (patch) | |
tree | e1630b98e0bb01ad8b26c6a50a7824eb41f0c448 /lib/vty_command.c | |
parent | 7e666be965b3ac61b05ccdeca2b61902bc26e172 (diff) | |
download | quagga-9c99076cf33bfa874db34151e28822f0e392ab3a.tar.bz2 quagga-9c99076cf33bfa874db34151e28822f0e392ab3a.tar.xz |
Fix compile on older gcc, and other minor fixes.
Slightly older gcc would not tolerate an offsetof() where the type part
contained a '->' -- replaced foo->bar by foo[0].bar, which is more
readily tolerated.
Fixed assert() in "--more--".
Improved some shut-down code.
Diffstat (limited to 'lib/vty_command.c')
-rw-r--r-- | lib/vty_command.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/vty_command.c b/lib/vty_command.c index 9aebc50f..94ba6833 100644 --- a/lib/vty_command.c +++ b/lib/vty_command.c @@ -297,6 +297,7 @@ vty_cmd_loop_exit(vty vty) uty_cmd_config_lock_check(vty, NULL_NODE) ; /* Can now close the vty */ + vty->vio->state = vc_stopped ; uty_close(vty->vio, NULL, false) ; /* not curtains */ VTY_UNLOCK() ; @@ -941,12 +942,16 @@ uty_cmd_hiatus(vty_io vio, cmd_return_code_t ret) return ret ; /* <<< exit here on CMD_WAITING */ case CMD_EOF: - case CMD_CLOSE: uty_out_accept(vio) ; /* accept any buffered remarks. */ assert(vio->real_depth > 0) ; --vio->real_depth ; break ; + case CMD_CLOSE: + uty_out_accept(vio) ; /* accept any buffered remarks. */ + vio->real_depth = 0 ; /* which it may already be */ + break ; + default: /* If not any of the above, must be an error of some kind: * |