diff options
author | Harald Welte <laforge@gnumonks.org> | 2013-02-10 10:21:12 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-06 15:50:36 +0200 |
commit | 6d5dc060ea333f372a0df45213936ca742e25176 (patch) | |
tree | a01e1b8a1b62bbeb40eb3742d534292c146d8ab2 /src/osmo-bts-sysmo | |
parent | b469e7314860794aebd904ebc4a63f877c01c3fc (diff) |
migrate away from our own abis.c code to libosmoabis
libosmoabis has a BTS-side implementation of the IPA protocol for years,
and osmo-bts should have used that all the time. Unfortunately it had
its own local hack, this patch is migrating to the libosmocore
implementation.
Diffstat (limited to 'src/osmo-bts-sysmo')
-rw-r--r-- | src/osmo-bts-sysmo/Makefile.am | 4 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/main.c | 27 |
2 files changed, 6 insertions, 25 deletions
diff --git a/src/osmo-bts-sysmo/Makefile.am b/src/osmo-bts-sysmo/Makefile.am index 1fe17eea..96ff49e9 100644 --- a/src/osmo-bts-sysmo/Makefile.am +++ b/src/osmo-bts-sysmo/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(OPENBSC_INCDIR) -AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOTRAU_CFLAGS) -LDADD = $(LIBOSMOVTY_LIBS) $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOTRAU_LIBS) -lortp +AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOABIS_CFLAGS) +LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS) -lortp EXTRA_DIST = misc/sysmobts_mgr.h misc/sysmobts_misc.h misc/sysmobts_par.h \ misc/sysmobts_eeprom.h femtobts.h hw_misc.h l1_fwd.h l1_if.h \ diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index a6760810..bf0d79a7 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -1,6 +1,6 @@ /* Main program for Sysmocom BTS */ -/* (C) 2011 by Harald Welte <laforge@gnumonks.org> +/* (C) 2011-2013 by Harald Welte <laforge@gnumonks.org> * * All Rights Reserved * @@ -106,24 +106,6 @@ void clk_cal_use_eeprom(struct gsm_bts *bts) "Read clock calibration(%d) from EEPROM.\n", hdl->clk_cal); } -struct ipabis_link *link_init(struct gsm_bts *bts, const char *ip) -{ - struct ipabis_link *link = talloc_zero(bts, struct ipabis_link); - struct in_addr ia; - int rc; - - inet_aton(ip, &ia); - - link->bts = bts; - bts->oml_link = link; - - rc = abis_open(link, ntohl(ia.s_addr)); - if (rc < 0) - return NULL; - - return link; -} - static void print_help() { printf( "Some useful options:\n" @@ -270,7 +252,7 @@ int main(int argc, char **argv) struct stat st; struct sched_param param; struct gsm_bts_role_bts *btsb; - struct ipabis_link *link; + struct e1inp_line *line; void *tall_msgb_ctx; int rc; @@ -342,12 +324,11 @@ int main(int argc, char **argv) exit(1); } - link = link_init(bts, btsb->bsc_oml_host); - if (!link) { + line = abis_open(bts, btsb->bsc_oml_host, "sysmoBTS"); + if (!line) { fprintf(stderr, "unable to connect to BSC\n"); exit(1); } - bts->oml_link = link; if (daemonize) { rc = osmo_daemonize(); |