From 6611e7f3059d26794a59135637076fe59cf52dae Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 30 Jun 2021 14:49:41 +0200 Subject: allow to configure multiple oml remote-ip addresses At the moment we can only configure a single BSC in the BTS configuration. This also means that if this single BSC fails for some reason the BTS has no alternate BSC to connect to. Lets extend the remote-ip parameter so that it can be used multiple times so that an operater can configure any number of BSCs that are tried one after another during BTS startup. Change-Id: I205f68a3a7f35fee4c38a7cfba2b014237df2727 Related: SYS#4971 --- src/osmo-bts-omldummy/main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/osmo-bts-omldummy') diff --git a/src/osmo-bts-omldummy/main.c b/src/osmo-bts-omldummy/main.c index a36e0db5..c74af745 100644 --- a/src/osmo-bts-omldummy/main.c +++ b/src/osmo-bts-omldummy/main.c @@ -107,7 +107,7 @@ int main(int argc, char **argv) { struct gsm_bts *bts; struct gsm_bts_trx *trx; - struct e1inp_line *line; + struct bsc_oml_host *bsc_oml_host; int i; parse_cmdline(argc, argv); @@ -144,9 +144,13 @@ int main(int argc, char **argv) //btsb = bts_role_bts(bts); abis_init(bts); - line = abis_open(bts, cmdline.dst_host, "OMLdummy"); - if (!line) - exit(2); + bsc_oml_host = talloc_zero(bts, struct bsc_oml_host); + OSMO_ASSERT(bsc_oml_host); + bsc_oml_host->addr = talloc_strdup(bsc_oml_host, cmdline.dst_host); + OSMO_ASSERT(bsc_oml_host->addr); + llist_add_tail(&bsc_oml_host->list, &bts->bsc_oml_hosts); + if (abis_open(bts, "OMLdummy") != 0) + exit(1); while (1) { osmo_select_main(0); -- cgit v1.2.3