aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-msc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-03-22 15:56:49 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-03-22 17:06:05 +0100
commitc01e90933fef6449f64db65a63590a6507bae34a (patch)
tree8757bfb928e630e32f40272509479c4137f161f0 /src/osmo-msc
parent6a8b9c70fceba57f624c9c23c97cbb27389e4584 (diff)
dissolve libcommon: move talloc ctx into msc_main.c, drop talloc_ctx.c
Drop tall_bsc_ctx; in mncc_sock_init(), talloc the mncc_sock_state from gsm_network. In tests or utils, move from using an extern tall_bsc_ctx to a local root context pointer. Change-Id: I92c252be1d1e7634f1653de47d37c99d77d9501c
Diffstat (limited to 'src/osmo-msc')
-rw-r--r--src/osmo-msc/msc_main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index 1cf264274..2b1a8c753 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -513,6 +513,10 @@ const struct log_info log_info = {
.num_cat = ARRAY_SIZE(msc_default_categories),
};
+extern void *tall_gsms_ctx;
+extern void *tall_call_ctx;
+extern void *tall_trans_ctx;
+
int main(int argc, char **argv)
{
int rc;
@@ -520,9 +524,13 @@ int main(int argc, char **argv)
msc_vty_info.copyright = osmomsc_copyright;
tall_msc_ctx = talloc_named_const(NULL, 1, "osmo_msc");
- talloc_ctx_init(tall_msc_ctx);
msc_vty_info.tall_ctx = tall_msc_ctx;
+ msgb_talloc_ctx_init(tall_msc_ctx, 0);
+ tall_gsms_ctx = talloc_named_const(tall_msc_ctx, 0, "sms");
+ tall_call_ctx = talloc_named_const(tall_msc_ctx, 0, "gsm_call");
+ tall_trans_ctx = talloc_named_const(tall_msc_ctx, 0, "transaction");
+
osmo_init_logging(&log_info);
osmo_stats_init(tall_msc_ctx);