From 50cc638ac74ec436778cce7b0f32aa765d961b38 Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Tue, 28 Feb 2023 11:02:47 +0100 Subject: [PATCH] osmo_{client,server}_main: Remove tall_ctr_ctx and tall_msgb_ctx tall_ctr_ctx is only used by the obsolete osmo_counters which are not used anymore. tall_msgb_ctx is now set through msgb_tallox_ctx_init(). Fixes undefined reference errors since libosmocore.map was introduced in I13169c00a59fb59513dfc598de5a71d094492422: ``` osmo-pcap/src/osmo_client_main.c:226: undefined reference to `tall_msgb_ctx' /usr/bin/ld: osmo-pcap/src/osmo_client_main.c:226: undefined reference to `tall_msgb_ctx' /usr/bin/ld: osmo-pcap/src/osmo_client_main.c:227: undefined reference to `tall_ctr_ctx' /usr/bin/ld: osmo-pcap/src/osmo_client_main.c:227: undefined reference to `tall_ctr_ctx' ``` Change-Id: Idcbb96fd070f5ad20d3091ce886dc6130968538f --- src/osmo_client_main.c | 5 +---- src/osmo_server_main.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/osmo_client_main.c b/src/osmo_client_main.c index 3033b15..8ca2df3 100644 --- a/src/osmo_client_main.c +++ b/src/osmo_client_main.c @@ -51,8 +51,6 @@ static int daemonize = 0; void *tall_cli_ctx; struct osmo_pcap_client *pcap_client; -extern void *tall_msgb_ctx; -extern void *tall_ctr_ctx; static const struct rate_ctr_desc pcap_client_ctr_desc[] = { @@ -223,8 +221,7 @@ static void signal_handler(int signum) static void talloc_init_ctx() { tall_cli_ctx = talloc_named_const(NULL, 0, "client"); - tall_msgb_ctx = talloc_named_const(tall_cli_ctx, 0, "msgb"); - tall_ctr_ctx = talloc_named_const(tall_cli_ctx, 0, "counter"); + msgb_talloc_ctx_init(tall_cli_ctx, 0); } int main(int argc, char **argv) diff --git a/src/osmo_server_main.c b/src/osmo_server_main.c index 484b51d..8ad89ba 100644 --- a/src/osmo_server_main.c +++ b/src/osmo_server_main.c @@ -52,8 +52,6 @@ static int daemonize = 0; void *tall_srv_ctx; struct osmo_pcap_server *pcap_server; -extern void *tall_msgb_ctx; -extern void *tall_ctr_ctx; static const struct rate_ctr_desc pcap_peer_ctr_desc[] = { @@ -235,8 +233,7 @@ static void signal_handler(int signum) static void talloc_init_ctx() { tall_srv_ctx = talloc_named_const(NULL, 0, "server"); - tall_msgb_ctx = talloc_named_const(tall_srv_ctx, 0, "msgb"); - tall_ctr_ctx = talloc_named_const(tall_srv_ctx, 0, "counter"); + msgb_talloc_ctx_init(tall_srv_ctx, 0); } int main(int argc, char **argv)