From 6079675bdb652045eff48880b0d9938b3e7e79ad Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 20 Mar 2019 11:39:40 +0100 Subject: make use of OTC_GLOBAL when allocating library-internal contexts As libosmcore is now managing the global talloc contexts, there's no point in having APIs where the user tells the library about which talloc contexts to use for a given sub-system. Change-Id: I48f475efd3ee0d5120b8fc30861e852d1a6920b1 --- src/stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/stats.c') diff --git a/src/stats.c b/src/stats.c index b5adbf29..da8f3d39 100644 --- a/src/stats.c +++ b/src/stats.c @@ -187,10 +187,10 @@ void osmo_stats_reporter_free(struct osmo_stats_reporter *srep) } /*! Initilize the stats reporting module; call this once in your program - * \param[in] ctx Talloc context from which stats related memory is allocated */ + * \param[in] ctx UNUSED, only for legacy API compatibility */ void osmo_stats_init(void *ctx) { - osmo_stats_ctx = ctx; + osmo_stats_ctx = talloc_named_const(OTC_GLOBAL, 0, "stats"); osmo_stat_item_discard_all(¤t_stat_item_index); is_initialised = 1; -- cgit v1.2.3