diff options
author | Chris Hall <chris.hall@highwayman.com> | 2011-05-12 20:11:05 +0100 |
---|---|---|
committer | Chris Hall <chris.hall@highwayman.com> | 2011-05-12 20:11:05 +0100 |
commit | 2aeaa406fd35ae6bf032d467eb20c864c962d30c (patch) | |
tree | 373c9c0c7fe6aa529f0a63fdc1ee7e6918a8b652 /lib | |
parent | af22333d1ffeb1248b2234d7cec7b90d305c2190 (diff) | |
download | quagga-2aeaa406fd35ae6bf032d467eb20c864c962d30c.tar.bz2 quagga-2aeaa406fd35ae6bf032d467eb20c864c962d30c.tar.xz |
Fix assert() in lib/vty_cli so does not go off during "write file"
Previously, assert failed to take into account possible extra state of
vty during "write file", so with particular sleight of hand could be
persuaded to go off invalidly.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vty_cli.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/vty_cli.c b/lib/vty_cli.c index b4791365..bdaf1128 100644 --- a/lib/vty_cli.c +++ b/lib/vty_cli.c @@ -373,7 +373,7 @@ extern enum vty_readiness uty_cli(vty_io vio) { VTY_ASSERT_LOCKED() ; - assert(vio->type == VTY_TERM) ; + assert((vio->type == VTY_TERM) || (vio->real_type == VTY_TERM)) ; if (vio->half_closed) return not_ready ; /* Nothing more if half closed */ @@ -411,7 +411,6 @@ static enum vty_readiness uty_cli_standard(vty_io vio) { VTY_ASSERT_LOCKED() ; - assert(vio->type == VTY_TERM) ; /* cli_blocked is set when is waiting for a command, or its output to * complete -- unless either of those has happened, is still blocked. |