From d5ffeb5e63eb223852a577b8f9a3c89bf0809fb3 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 18 Mar 2019 15:48:38 +0100 Subject: Explicitly clean up BTS singleton Add method to explicitly cleanup BTS singleton similar to GprsMsStorage class and use it from main(). The destructor becomes trivial wrapper around cleanup() method. This prevents annoying SIGABRT on exit of OsmoPCU caused by rate_ctr_group_free() being called after talloc_free() which removes the context in which counter group is allocated. Change-Id: I796d56a7de3f3a1f9d59708995c8e3e9b05a2747 --- src/bts.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/bts.h') diff --git a/src/bts.h b/src/bts.h index b83ab4b4..ee5a6925 100644 --- a/src/bts.h +++ b/src/bts.h @@ -272,6 +272,7 @@ public: BTS(); ~BTS(); + void cleanup(); static BTS* main_bts(); @@ -591,6 +592,7 @@ CREATE_STAT_INLINE(ms_present, ms_present_get, STAT_MS_PRESENT); #ifdef __cplusplus extern "C" { #endif + void bts_cleanup(); struct gprs_rlcmac_bts *bts_main_data(); struct rate_ctr_group *bts_main_data_stats(); struct osmo_stat_item_group *bts_main_data_stat_items(); -- cgit v1.2.3