diff options
author | paulo <paul@bayleaf.org.uk> | 2009-12-10 14:25:48 +0000 |
---|---|---|
committer | paulo <paul@bayleaf.org.uk> | 2009-12-10 14:25:48 +0000 |
commit | 7f6da094bad38e3593e475a81a28f1833d911c46 (patch) | |
tree | cf46717c52836592f119266e26371ec5b143d544 /lib/vty.c | |
parent | ada29520eb2c6e558917d4c572fce1feeeb3cd0c (diff) | |
download | quagga-7f6da094bad38e3593e475a81a28f1833d911c46.tar.bz2 quagga-7f6da094bad38e3593e475a81a28f1833d911c46.tar.xz |
Needed unprotected version of vty_reset for use in vty_terminate
Diffstat (limited to 'lib/vty.c')
-rw-r--r-- | lib/vty.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -100,6 +100,7 @@ static int uty_timeout (struct vty *vty); static void vty_timeout_r (qtimer qtr, void* timer_info, qtime_t when); static void vty_read_r (qps_file qf, void* file_info); static void vty_flush_r (qps_file qf, void* file_info); +void uty_reset (void); /* Extern host structure from command.c */ extern struct host host; @@ -3345,13 +3346,19 @@ struct cmd_node vty_node = void vty_reset () { + LOCK + uty_reset(); + UNLOCK +} + +void +uty_reset () +{ unsigned int i; struct vty *vty; struct thread *vty_serv_thread; qps_file qf; - LOCK - for (i = 0; i < vector_active (vtyvec); i++) if ((vty = vector_slot (vtyvec, i)) != NULL) { @@ -3396,7 +3403,6 @@ vty_reset () XFREE(MTYPE_VTY, vty_ipv6_accesslist_name); vty_ipv6_accesslist_name = NULL; } - UNLOCK } static void @@ -3538,7 +3544,7 @@ vty_terminate (void) if (vtyvec && Vvty_serv_thread) { - vty_reset (); + uty_reset (); vector_free (vtyvec); vector_free (Vvty_serv_thread); } |