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/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgHello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1125 to look at the new patch set (#2). move to libcommon-cs: net init 1: rename to bsc_network_init The gsm_network_init() function initializes a whole lot of BSC specific stuff. Aiming to move some of it to libcommon-cs, first rename it to bsc_network_init(). This will retain the BSC specific stuff when the move is done. Adjust all callers. Future: osmo-cscn will call the more generic part and not the BSC specific part. Change-Id: I4816ae19374390fc5c64972f7cad2e9ec3d8bcc3 --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/ipaccess/ipaccess-config.c M openbsc/src/libbsc/bsc_init.c M openbsc/src/libbsc/net_init.c M openbsc/src/utils/bs11_config.c M openbsc/tests/channel/channel_test.c M openbsc/tests/gsm0408/gsm0408_test.c 7 files changed, 10 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/25/1125/2 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index fe3fa29..ea450be 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -415,7 +415,7 @@ extern void talloc_ctx_init(void *ctx_root); -struct gsm_network *gsm_network_init(void *ctx, +struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, uint16_t network_code, mncc_recv_cb_t mncc_recv); diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 3c2d6cc..06589f7 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c @@ -986,7 +986,7 @@ } libosmo_abis_init(tall_ctx_config); - bsc_gsmnet = gsm_network_init(tall_bsc_ctx, 1, 1, NULL); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); if (!bsc_gsmnet) exit(1); diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index a1becf8..214926b 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -36,6 +36,7 @@ #include <openbsc/ipaccess.h> #include <osmocom/gsm/sysinfo.h> #include <openbsc/e1_config.h> +#include <openbsc/osmo_bsc.h> /* global pointer to the gsm network data structure */ extern struct gsm_network *bsc_gsmnet; @@ -481,7 +482,7 @@ int rc; /* initialize our data structures */ - bsc_gsmnet = gsm_network_init(tall_bsc_ctx, 1, 1, mncc_recv); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, mncc_recv); if (!bsc_gsmnet) return -ENOMEM; diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index da13a52..07a4423 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -17,13 +17,14 @@ * */ +#include <openbsc/osmo_bsc.h> #include <openbsc/gsm_data.h> #include <openbsc/osmo_msc_data.h> #include <openbsc/gsm_subscriber.h> #include <stdbool.h> -struct gsm_network *gsm_network_init(void *ctx, +struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, uint16_t network_code, mncc_recv_cb_t mncc_recv) diff --git a/openbsc/src/utils/bs11_config.c b/openbsc/src/utils/bs11_config.c index 20b9ed3..ee43a40 100644 --- a/openbsc/src/utils/bs11_config.c +++ b/openbsc/src/utils/bs11_config.c @@ -897,7 +897,7 @@ handle_options(argc, argv); bts_model_bs11_init(); - gsmnet = gsm_network_init(tall_bs11cfg_ctx, 1, 1, NULL); + gsmnet = bsc_network_init(tall_bs11cfg_ctx, 1, 1, NULL); if (!gsmnet) { fprintf(stderr, "Unable to allocate gsm network\n"); exit(1); diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c index b4a5fb1..0c730a2 100644 --- a/openbsc/tests/channel/channel_test.c +++ b/openbsc/tests/channel/channel_test.c @@ -66,7 +66,7 @@ printf("Testing the gsm_subscriber chan logic\n"); /* Create a dummy network */ - network = gsm_network_init(tall_bsc_ctx, 1, 1, NULL); + network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); if (!network) exit(1); bts = gsm_bts_alloc(network); diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index e81394f..15248f2 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -122,7 +122,7 @@ static inline void test_si2q_u(void) { struct gsm_bts *bts; - struct gsm_network *network = gsm_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); printf("Testing SYSINFO_TYPE_2quater UARFCN generation:\n"); if (!network) @@ -149,7 +149,7 @@ static inline void test_si2q_e(void) { struct gsm_bts *bts; - struct gsm_network *network = gsm_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); printf("Testing SYSINFO_TYPE_2quater EARFCN generation:\n"); if (!network) -- To view, visit https://gerrit.osmocom.org/1125 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4816ae19374390fc5c64972f7cad2e9ec3d8bcc3 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder