From 64c422858db9388e210875dc681f2d1952e0d0bb Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 1 Dec 2020 17:25:28 +0100 Subject: Store GPRS MOs directly under BTS SiteMgr object The only real 1-1 relationship between BTS NM objects is the one between GPRS Cell and BTS (which is actually a BTS cell). In our current osmo-bts implementation we don't care much since we only handle 1-cell BTSses, but let's make the data structure organization more generic. Implementation notes: The gsm_bts_sm is moved to its own file, APIs to allocate are added and the new public object is hooked correctly in the allocation process of osmo-bsc. Change-Id: I06461b7784fa2a78de37383406e35beae85fbad8 --- tests/acc/acc_test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/acc/acc_test.c') diff --git a/tests/acc/acc_test.c b/tests/acc/acc_test.c index 81b9e8dd2..73757c7c6 100644 --- a/tests/acc/acc_test.c +++ b/tests/acc/acc_test.c @@ -44,7 +44,8 @@ static void clock_debug(char* str) #define bts_init(net) _bts_init(net, __func__) static inline struct gsm_bts *_bts_init(struct gsm_network *net, const char *msg) { - struct gsm_bts *bts = gsm_bts_alloc(net, 0); + struct gsm_bts_sm *bts_sm = gsm_bts_sm_alloc(net, 0); + struct gsm_bts *bts = bts_sm->bts[0]; if (!bts) { fprintf(stderr, "BTS allocation failure in %s()\n", msg); exit(1); @@ -66,7 +67,7 @@ static inline void _bts_del(struct gsm_bts *bts, const char *msg) if (osmo_timer_pending(&bts->acc_ramp.step_timer)) osmo_timer_del(&bts->acc_ramp.step_timer); /* no need to llist_del(&bts->list), we never registered the bts there. */ - talloc_free(bts); + talloc_free(bts->site_mgr); fprintf(stderr, "BTS deallocated OK in %s()\n", msg); } -- cgit v1.2.3