]> git.puffer.fish Git - matthieu/frr.git/commitdiff
[vty] Allow delete during password entry
authorRoy <quagga@de.vio.us>
Wed, 13 Aug 2008 16:27:38 +0000 (17:27 +0100)
committerPaul Jakma <paul@quagga.net>
Fri, 22 Aug 2008 18:52:57 +0000 (19:52 +0100)
2008-08-13 roy <quagga@de.vio.us>

* lib/vty.c: (vty_delete_char) move check for authentication
  down a bit, so we do the delete, but still not re-write of line.

Signed-off-by: Paul Jakma <paul@quagga.net>
lib/vty.c

index ccf6640690957345ea20be785f6eee9a8d228694..32084713ee2989312edb86f79cb388ba3adbb8ee 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -727,9 +727,6 @@ vty_delete_char (struct vty *vty)
   int i;
   int size;
 
-  if (vty->node == AUTH_NODE || vty->node == AUTH_ENABLE_NODE)
-    return;
-
   if (vty->length == 0)
     {
       vty_down_level (vty);
@@ -744,6 +741,9 @@ vty_delete_char (struct vty *vty)
   vty->length--;
   memmove (&vty->buf[vty->cp], &vty->buf[vty->cp + 1], size - 1);
   vty->buf[vty->length] = '\0';
+  
+  if (vty->node == AUTH_NODE || vty->node == AUTH_ENABLE_NODE)
+    return;
 
   vty_write (vty, &vty->buf[vty->cp], size - 1);
   vty_write (vty, &telnet_space_char, 1);