aboutsummaryrefslogtreecommitdiffstats
path: root/src/stats.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-03-20 11:39:40 +0100
committerHarald Welte <laforge@gnumonks.org>2019-07-31 11:50:27 +0200
commit6079675bdb652045eff48880b0d9938b3e7e79ad (patch)
treeaf0651e53b2cd9023ee69ea5f29cdf6603bac1e7 /src/stats.c
parent7b4a05d535f0ecc070e9b506ad0a667e24b67f71 (diff)
make use of OTC_GLOBAL when allocating library-internal contextslaforge/context
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
Diffstat (limited to 'src/stats.c')
-rw-r--r--src/stats.c4
1 files changed, 2 insertions, 2 deletions
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(&current_stat_item_index);
is_initialised = 1;