aboutsummaryrefslogtreecommitdiffstats
path: root/tests/sms_queue/sms_queue_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sms_queue/sms_queue_test.c')
-rw-r--r--tests/sms_queue/sms_queue_test.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c
index 641cc5f4f..6ce0b88b0 100644
--- a/tests/sms_queue/sms_queue_test.c
+++ b/tests/sms_queue/sms_queue_test.c
@@ -198,10 +198,12 @@ static struct log_info info = {
int main(int argc, char **argv)
{
void *msgb_ctx;
+ void *logging_ctx;
talloc_ctx = talloc_named_const(NULL, 0, "sms_queue_test");
- msgb_ctx = msgb_talloc_ctx_init(NULL, 0);
- osmo_init_logging(&info);
+ msgb_ctx = msgb_talloc_ctx_init(talloc_ctx, 0);
+ logging_ctx = talloc_named_const(talloc_ctx, 0, "logging");
+ osmo_init_logging2(logging_ctx, &info);
OSMO_ASSERT(osmo_stderr_target);
log_set_use_color(osmo_stderr_target, 0);
@@ -222,6 +224,7 @@ int main(int argc, char **argv)
OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1);
OSMO_ASSERT(talloc_total_size(msgb_ctx) == 0);
talloc_free(msgb_ctx);
+ talloc_free(logging_ctx);
if (talloc_total_blocks(talloc_ctx) != 1
|| talloc_total_size(talloc_ctx) != 0)