[PATCH] libosmocore[master]: vty/vty.c: do not bind vty context to application's one

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Sat Sep 23 16:53:12 UTC 2017


Review at  https://gerrit.osmocom.org/4017

vty/vty.c: do not bind vty context to application's one

The 'vty_app_info' struct could be used by some applications to
provide its talloc context. In the future, it will facilitate
the implementation of talloc context introspection via VTY.

But the 'vty' talloc context, that contains lots of items
(memory chunks), is being bound to an application's one,
so it becomes hard to read the last.

Let's do not bind the 'vty' context automatically, until some
common talloc context export policy is implemented.

Change-Id: I9cb6ce9f24dbae400029e2d9f9c933fbfb16248f
---
M src/vty/vty.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/4017/1

diff --git a/src/vty/vty.c b/src/vty/vty.c
index bd0d2c3..3d9c0d6 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -1773,7 +1773,7 @@
 /* Install vty's own commands like `who' command. */
 void vty_init(struct vty_app_info *app_info)
 {
-	tall_vty_ctx = talloc_named_const(app_info->tall_ctx, 0, "vty");
+	tall_vty_ctx = talloc_named_const(NULL, 0, "vty");
 	tall_vty_vec_ctx = talloc_named_const(tall_vty_ctx, 0, "vty_vector");
 	tall_vty_cmd_ctx = talloc_named_const(tall_vty_ctx, 0, "vty_command");
 

-- 
To view, visit https://gerrit.osmocom.org/4017
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9cb6ce9f24dbae400029e2d9f9c933fbfb16248f
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>



More information about the gerrit-log mailing list