mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
ipaccess: Remove the ipaccess_gsmnet and assume there is a bsc_gsmnet
Assume that there is a bsc_gsmnet and modify the ipaccess-config to provide this symbol. If a bsc_gsmmnet is not available when linked the linker will complain and fail. E.g. give an error like this: ../../src/libbsc/libbsc.a(bts_ipaccess_nanobts.o): In function `ipaccess_sign_link_up': src/libbsc/bts_ipaccess_nanobts.c:550: undefined reference to `bsc_gsmnet'
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
#include <osmocom/core/talloc.h>
|
||||
#include <osmocom/abis/abis.h>
|
||||
|
||||
static struct gsm_network *gsmnet;
|
||||
struct gsm_network *bsc_gsmnet;
|
||||
|
||||
static int net_listen_testnr;
|
||||
static int restart;
|
||||
@@ -980,11 +980,11 @@ int main(int argc, char **argv)
|
||||
}
|
||||
libosmo_abis_init(tall_ctx_config);
|
||||
|
||||
gsmnet = gsm_network_init(1, 1, NULL);
|
||||
if (!gsmnet)
|
||||
bsc_gsmnet = gsm_network_init(1, 1, NULL);
|
||||
if (!bsc_gsmnet)
|
||||
exit(1);
|
||||
|
||||
bts = gsm_bts_alloc_register(gsmnet, GSM_BTS_TYPE_NANOBTS, HARDCODED_TSC,
|
||||
bts = gsm_bts_alloc_register(bsc_gsmnet, GSM_BTS_TYPE_NANOBTS, HARDCODED_TSC,
|
||||
HARDCODED_BSIC);
|
||||
/* ip.access supports up to 4 chained TRX */
|
||||
gsm_bts_trx_alloc(bts);
|
||||
|
@@ -38,6 +38,8 @@
|
||||
#include <osmocom/abis/ipaccess.h>
|
||||
#include <osmocom/core/logging.h>
|
||||
|
||||
extern struct gsm_network *bsc_gsmnet;
|
||||
|
||||
static int bts_model_nanobts_start(struct gsm_network *net);
|
||||
static void bts_model_nanobts_e1line_bind_ops(struct e1inp_line *line);
|
||||
|
||||
@@ -457,13 +459,10 @@ static int bts_ipa_nm_sig_cb(unsigned int subsys, unsigned int signal,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct gsm_network *ipaccess_gsmnet;
|
||||
|
||||
static int bts_model_nanobts_start(struct gsm_network *net)
|
||||
{
|
||||
osmo_signal_unregister_handler(SS_NM, bts_ipa_nm_sig_cb, NULL);
|
||||
osmo_signal_register_handler(SS_NM, bts_ipa_nm_sig_cb, NULL);
|
||||
ipaccess_gsmnet = net;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -534,7 +533,7 @@ ipaccess_sign_link_up(void *unit_data, struct e1inp_line *line,
|
||||
struct ipaccess_unit *dev = unit_data;
|
||||
struct e1inp_sign_link *sign_link = NULL;
|
||||
|
||||
bts = find_bts_by_unitid(ipaccess_gsmnet, dev->site_id, dev->bts_id);
|
||||
bts = find_bts_by_unitid(bsc_gsmnet, dev->site_id, dev->bts_id);
|
||||
if (!bts) {
|
||||
LOGP(DLINP, LOGL_ERROR, "Unable to find BTS configuration for "
|
||||
" %u/%u/%u, disconnecting\n", dev->site_id,
|
||||
|
Reference in New Issue
Block a user