From 39ae17fb6945c0b4d88fa219fea1563fb9177fdc Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 16 Sep 2016 01:49:08 +0200 Subject: msgb ctx: use new msgb_talloc_ctx_init(), don't access talloc_msgb_ctx Drop extern definitions of talloc_msgb_ctx and use msgb_talloc_ctx_init() instead. In sgsn_test.c, use a local variable msgb_ctx to do the talloc report from the return value of msgb_talloc_ctx_init(). Change-Id: I2f9ace855f0ecbdc9adf5d75bcb1a3d666570de4 --- openbsc/src/osmo-bsc_nat/bsc_nat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat.c') diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 6ae8c0501..a4dd67901 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -1573,12 +1573,11 @@ out: osmo_timer_schedule(&sccp_close, SCCP_CLOSE_TIME, 0); } -extern void *tall_msgb_ctx; extern void *tall_ctr_ctx; static void talloc_init_ctx() { tall_bsc_ctx = talloc_named_const(NULL, 0, "nat"); - tall_msgb_ctx = talloc_named_const(tall_bsc_ctx, 0, "msgb"); + msgb_talloc_ctx_init(tall_bsc_ctx, 0); tall_ctr_ctx = talloc_named_const(tall_bsc_ctx, 0, "counter"); } -- cgit v1.2.3