This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgNeels Hofmeyr has submitted this change and it was merged. Change subject: msgb ctx: use new msgb_talloc_ctx_init() in various main()s ...................................................................... msgb ctx: use new msgb_talloc_ctx_init() in various main()s Change-Id: I31d62d5e1f0b272985fdef5013270d385c4b988a --- M src/common/main.c M src/osmo-bts-litecell15/misc/lc15bts_mgr.c M src/osmo-bts-sysmo/misc/sysmobts_mgr.c M tests/agch/agch_test.c M tests/cipher/cipher_test.c M tests/handover/handover_test.c M tests/paging/paging_test.c 7 files changed, 7 insertions(+), 24 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/main.c b/src/common/main.c index 99febe0..60839df 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -219,14 +219,12 @@ struct gsm_bts_role_bts *btsb; struct gsm_bts_trx *trx; struct e1inp_line *line; - void *tall_msgb_ctx; int rc, i; printf("((*))\n |\n / \\ OsmoBTS\n"); tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_pool(tall_bts_ctx, 100*1024); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 100*1024); bts_log_init(NULL); diff --git a/src/osmo-bts-litecell15/misc/lc15bts_mgr.c b/src/osmo-bts-litecell15/misc/lc15bts_mgr.c index c97525c..193e108 100644 --- a/src/osmo-bts-litecell15/misc/lc15bts_mgr.c +++ b/src/osmo-bts-litecell15/misc/lc15bts_mgr.c @@ -222,13 +222,11 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; int rc; tall_mgr_ctx = talloc_named_const(NULL, 1, "bts manager"); - tall_msgb_ctx = talloc_named_const(tall_mgr_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_mgr_ctx); mgr_log_init(); diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c index ccb84d8..f126db2 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c @@ -245,13 +245,11 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; int rc; tall_mgr_ctx = talloc_named_const(NULL, 1, "bts manager"); - tall_msgb_ctx = talloc_named_const(tall_mgr_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_mgr_ctx, 0); mgr_log_init(); if (classify_bts() != 0) diff --git a/tests/agch/agch_test.c b/tests/agch/agch_test.c index 4175bdd..e275c64 100644 --- a/tests/agch/agch_test.c +++ b/tests/agch/agch_test.c @@ -224,11 +224,8 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; - tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 0); bts_log_init(NULL); diff --git a/tests/cipher/cipher_test.c b/tests/cipher/cipher_test.c index a175012..c913925 100644 --- a/tests/cipher/cipher_test.c +++ b/tests/cipher/cipher_test.c @@ -66,11 +66,8 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; - tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 0); bts_log_init(NULL); diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index e1f4d86..d1dc34a 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -58,7 +58,6 @@ { struct gsm_bts_role_bts *btsb; void *tall_bts_ctx; - void *tall_msgb_ctx; struct e1inp_line *line; struct gsm_lchan *lchan; struct osmo_phsap_prim nl1sap; @@ -67,8 +66,7 @@ int i; tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 0); bts_log_init(NULL); osmo_stderr_target->categories[DHO].loglevel = LOGL_DEBUG; diff --git a/tests/paging/paging_test.c b/tests/paging/paging_test.c index de839e4..1d5f216 100644 --- a/tests/paging/paging_test.c +++ b/tests/paging/paging_test.c @@ -112,11 +112,8 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; - tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 0); bts_log_init(NULL); -- To view, visit https://gerrit.osmocom.org/1055 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I31d62d5e1f0b272985fdef5013270d385c4b988a Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>