neels has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/32619 )
Change subject: ranap_rab_ass_test.c: clarify talloc contexts
......................................................................
ranap_rab_ass_test.c: clarify talloc contexts
Change-Id: I4256e0d94a7e7fbba236aa92c44229c12cf17313
---
M tests/ranap_rab_ass/ranap_rab_ass_test.c
1 file changed, 14 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/19/32619/1
diff --git a/tests/ranap_rab_ass/ranap_rab_ass_test.c
b/tests/ranap_rab_ass/ranap_rab_ass_test.c
index 03b0836..fc2992d 100644
--- a/tests/ranap_rab_ass/ranap_rab_ass_test.c
+++ b/tests/ranap_rab_ass/ranap_rab_ass_test.c
@@ -33,7 +33,6 @@
#include <osmocom/ranap/ranap_common_cn.h>
#include <osmocom/ranap/ranap_common_ran.h>
-static void *tall_hnb_ctx;
static void *msgb_ctx;
extern void *talloc_asn1_ctx;
@@ -368,12 +367,13 @@
int test_init(void)
{
int rc;
+ void *root_ctx;
- tall_hnb_ctx = talloc_named_const(NULL, 0, "hnb_context");
- msgb_ctx = msgb_talloc_ctx_init(NULL, 0);
- talloc_asn1_ctx = talloc_named_const(NULL, 0, "asn1_context");
+ root_ctx = talloc_named_const(NULL, 0, "ranap_rab_ass_test");
+ msgb_ctx = msgb_talloc_ctx_init(root_ctx, 0);
+ talloc_asn1_ctx = talloc_named_const(root_ctx, 0, "asn1_context");
- rc = osmo_init_logging2(tall_hnb_ctx, &test_log_info);
+ rc = osmo_init_logging2(root_ctx, &test_log_info);
if (rc < 0)
exit(1);
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/32619
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I4256e0d94a7e7fbba236aa92c44229c12cf17313
Gerrit-Change-Number: 32619
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange