diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/command.c | 5 | ||||
-rw-r--r-- | lib/vty.c | 10 | ||||
-rw-r--r-- | lib/vty.h | 4 |
3 files changed, 13 insertions, 6 deletions
diff --git a/lib/command.c b/lib/command.c index 5d429338..ade413bb 100644 --- a/lib/command.c +++ b/lib/command.c @@ -20,11 +20,14 @@ Boston, MA 02111-1307, USA. */ #include <zebra.h> -#include "command.h" + #include "memory.h" #include "log.h" #include "version.h" #include "thread.h" +#include "vector.h" +#include "vty.h" +#include "command.h" /* Command vector which includes some level of command lists. Normally each daemon maintains each own cmdvec. */ @@ -23,16 +23,17 @@ #include <zebra.h> #include "linklist.h" +#include "thread.h" #include "buffer.h" #include "version.h" #include "command.h" #include "sockunion.h" -#include "thread.h" #include "memory.h" #include "str.h" #include "log.h" #include "prefix.h" #include "filter.h" +#include "vty.h" #include "privs.h" /* Vty events */ @@ -2342,8 +2343,7 @@ vty_config_unlock (struct vty *vty) } /* Master of the threads. */ -extern struct thread_master *master; -/* struct thread_master *master; */ +static struct thread_master *master; static void vty_event (enum event event, int sock, struct vty *vty) @@ -2791,13 +2791,15 @@ vty_init_vtysh () /* Install vty's own commands like `who' command. */ void -vty_init () +vty_init (struct thread_master *master_thread) { /* For further configuration read, preserve current directory. */ vty_save_cwd (); vtyvec = vector_init (VECTOR_MIN_SIZE); + master = master_thread; + /* Initilize server thread vector. */ Vvty_serv_thread = vector_init (VECTOR_MIN_SIZE); @@ -21,6 +21,8 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #ifndef _ZEBRA_VTY_H #define _ZEBRA_VTY_H +#include "thread.h" + #define VTY_BUFSIZ 512 #define VTY_MAXHIST 20 @@ -184,7 +186,7 @@ struct vty extern char integrate_default[]; /* Prototypes. */ -void vty_init (void); +void vty_init (struct thread_master *); void vty_init_vtysh (void); void vty_reset (void); void vty_finish (void); |