From 0224e4d051ad7bd159ae82512bc554e90f4de99f Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 7 Aug 2009 13:25:41 +0200 Subject: use one talloc context for entire vty code --- openbsc/src/vty/vty.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'openbsc/src/vty/vty.c') diff --git a/openbsc/src/vty/vty.c b/openbsc/src/vty/vty.c index 05499142e..9962474c8 100644 --- a/openbsc/src/vty/vty.c +++ b/openbsc/src/vty/vty.c @@ -33,7 +33,7 @@ static int vty_config; static int no_password_check = 1; -static void *tall_vty_ctx; +void *tall_vty_ctx; static void vty_clear_buf(struct vty *vty) { @@ -1616,14 +1616,15 @@ void vty_init_vtysh() vtyvec = vector_init(VECTOR_MIN_SIZE); } +extern void *tall_bsc_ctx; /* Install vty's own commands like `who' command. */ void vty_init() { + tall_vty_ctx = talloc_named_const(tall_bsc_ctx, 1, "vty"); + /* For further configuration read, preserve current directory. */ vty_save_cwd(); - host.config = "openbsc.cfg"; - vtyvec = vector_init(VECTOR_MIN_SIZE); /* Install bgp top node. */ -- cgit v1.2.3