aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bitcomp
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-04-01 16:54:40 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-04-01 16:57:42 +0200
commit42f2d61ac9d4be3ffc5ece501de8d0ac25f0ca14 (patch)
tree02cc70f4081ca4f86ce58760f533d22f3669c638 /tests/bitcomp
parente6e4898027f45ea48dc1adf0cf4ea558a1960f4f (diff)
use osmo_init_logging2() with proper talloc ctx
There is a duality of initialization: early_init() in bts.cpp wants to init logging even before static instances get initialized. Make sure that tall_pcu_ctx is initialized during early_init() as well. There is a build context that does not seem to include bts.cpp (osmo-pcu-remote), so to be sure, init tall_pcu_ctx as NULL and both in early_init() as well as pcu_main.cpp, init both tall_pcu_ctx and logging if it is still NULL. Change-Id: I2199b62d0270bd35dec2283e8f5b364b7c63915b
Diffstat (limited to 'tests/bitcomp')
-rw-r--r--tests/bitcomp/BitcompTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/bitcomp/BitcompTest.cpp b/tests/bitcomp/BitcompTest.cpp
index 8dd4534e..98bb2cc8 100644
--- a/tests/bitcomp/BitcompTest.cpp
+++ b/tests/bitcomp/BitcompTest.cpp
@@ -188,15 +188,15 @@ static void test_EPDAN_decode_tree(void)
int main(int argc, char **argv)
{
- osmo_init_logging(&gprs_log_info);
- log_set_use_color(osmo_stderr_target, 0);
- log_set_print_filename(osmo_stderr_target, 0);
- log_parse_category_mask(osmo_stderr_target, "DRLCMACUL,1");
-
tall_pcu_ctx = talloc_named_const(NULL, 1, "moiji-mobile bitcompTest context");
if (!tall_pcu_ctx)
abort();
+ osmo_init_logging2(tall_pcu_ctx, &gprs_log_info);
+ log_set_use_color(osmo_stderr_target, 0);
+ log_set_print_filename(osmo_stderr_target, 0);
+ log_parse_category_mask(osmo_stderr_target, "DRLCMACUL,1");
+
test_EPDAN_decode_tree();
if (getenv("TALLOC_REPORT_FULL"))