diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-10-05 18:49:43 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-10-07 14:08:15 +0200 |
commit | 12adbeaba35032bc81647e6ccbd6bfdbe4cdf248 (patch) | |
tree | a35be42878180f72b30ba6038cc0d5727f5b8d33 | |
parent | 7974008436a910f008eb42611014ce9c385a16ae (diff) |
Move global var bsc_gsmnet into libbsc [2/4]
This is used inside group of files forming libbsc (shared files used by
several apps). Let's instantie only once inside a file from libbsc
instead of doing so on each binary.
This is one further step towards fixing interdependency mess of symbols
and stubs.
Change-Id: I9b287aa492ca6aae5fc56133e1510aff3146fe25
-rw-r--r-- | src/ipaccess/ipaccess-config.c | 2 | ||||
-rw-r--r-- | src/osmo-bsc/bsc_init.c | 2 | ||||
-rw-r--r-- | src/osmo-bsc/osmo_bsc_main.c | 1 | ||||
-rw-r--r-- | tests/bsc/bsc_test.c | 1 | ||||
-rw-r--r-- | tests/gsm0408/gsm0408_test.c | 3 | ||||
-rw-r--r-- | tests/handover/handover_test.c | 2 |
6 files changed, 2 insertions, 9 deletions
diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index 02501bdb5..741a97e70 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -58,8 +58,6 @@ #include <osmocom/bsc/bss.h> #include <osmocom/bsc/bts.h> -struct gsm_network *bsc_gsmnet; - static int net_listen_testnr; static int restart; static bool get_attr; diff --git a/src/osmo-bsc/bsc_init.c b/src/osmo-bsc/bsc_init.c index a85e76f09..bf150cb40 100644 --- a/src/osmo-bsc/bsc_init.c +++ b/src/osmo-bsc/bsc_init.c @@ -47,6 +47,8 @@ #include <limits.h> #include <stdbool.h> +struct gsm_network *bsc_gsmnet; + int bsc_shutdown_net(struct gsm_network *net) { struct gsm_bts *bts; diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 0ed00335b..8d6901d66 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -87,7 +87,6 @@ #include "../../bscconfig.h" -struct gsm_network *bsc_gsmnet = 0; static const char *config_file = "osmo-bsc.cfg"; static const char *rf_ctrl = NULL; static int daemonize = 0; diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index dbb547e82..0cf0bc265 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -39,7 +39,6 @@ #include <search.h> void *ctx = NULL; -struct gsm_network *bsc_gsmnet = NULL; enum test { TEST_SCAN_TO_BTS, diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 4255ab26e..401729351 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -57,9 +57,6 @@ __FILE__, __LINE__, (int) res, # cmp, (int) wanted); \ } - -struct gsm_network *bsc_gsmnet = NULL; - static inline void gen(struct gsm_bts *bts, const char *s) { int r; diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index a355d3b0e..bd65b2f75 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -58,8 +58,6 @@ void *ctx; -struct gsm_network *bsc_gsmnet; - /* override, requires '-Wl,--wrap=osmo_mgcpc_ep_ci_request'. * Catch modification of an MGCP connection. */ void __real_osmo_mgcpc_ep_ci_request(struct osmo_mgcpc_ep_ci *ci, |