This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/25707 )
Change subject: Move global var bsc_gsmnet into libbsc
......................................................................
Move global var bsc_gsmnet into libbsc
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.
Change-Id: I9b287aa492ca6aae5fc56133e1510aff3146fe25
---
M src/ipaccess/ipaccess-config.c
M src/osmo-bsc/bsc_init.c
M src/osmo-bsc/osmo_bsc_main.c
M tests/bsc/bsc_test.c
M tests/gsm0408/gsm0408_test.c
M tests/handover/handover_test.c
6 files changed, 2 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/07/25707/1
diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c
index 02501bd..741a97e 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 a85e76f..bf150cb 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 0ed0033..8d6901d 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 dbb547e..0cf0bc2 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 4255ab2..4017293 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 a355d3b..bd65b2f 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,
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/25707
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9b287aa492ca6aae5fc56133e1510aff3146fe25
Gerrit-Change-Number: 25707
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211007/fcc5e387/attachment.htm>