From 97aa0881beacf536e3a2296381c055887583db8f Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Fri, 2 Sep 2011 11:08:56 +0200 Subject: Support of GSM uses socket interface for both network and mobile There is no linking of any osmocomBB source code required. In order to use osmocomBB or OpenBSC, just enable the interface, as described in defaults/interface.conf. At osmocomBB/mobile or at OpenBSC, just use the option "-m" to enable the socket interface. Enable GSM at LCR with "./configure --with-gsm-ms --with-gsm-bs". --- interface.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'interface.c') diff --git a/interface.c b/interface.c index 4e432af..57d7fe8 100644 --- a/interface.c +++ b/interface.c @@ -897,11 +897,6 @@ static int inter_gsm_bs(struct interface *interface, char *filename, int line, c struct interface_port *ifport; struct interface *searchif; - /* check gsm */ - if (!gsm) { - SPRINT(interface_error, "Error in %s (line %d): GSM is not activated.\n", filename, line); - return(-1); - } searchif = interface_newlist; while(searchif) { ifport = searchif->ifport; @@ -936,13 +931,6 @@ static int inter_gsm_ms(struct interface *interface, char *filename, int line, c #else struct interface_port *ifport, *searchifport; struct interface *searchif; - char *element; - - /* check gsm */ - if (!gsm) { - SPRINT(interface_error, "Error in %s (line %d): GSM is not activated.\n", filename, line); - return(-1); - } /* set portname */ if (inter_portname(interface, filename, line, (char *)"portname", options.loopback_lcr)) @@ -955,12 +943,11 @@ static int inter_gsm_ms(struct interface *interface, char *filename, int line, c ifport->gsm_ms = 1; /* copy values */ - element = strsep(&value, " "); - if (!element || !element[0]) { + if (!value || !value[0]) { SPRINT(interface_error, "Error in %s (line %d): Missing MS name and socket name.\n", filename, line); return(-1); } - SCPY(ifport->gsm_ms_name, element); + SCPY(ifport->gsm_ms_name, value); /* check if name is used multiple times */ searchif = interface_newlist; @@ -1538,6 +1525,10 @@ void relink_interfaces(void) #ifdef WITH_GSM_MS if (ifport->gsm_ms) gsm_ms_delete(ifport->gsm_ms_name); +#endif +#ifdef WITH_GSM_BS + if (ifport->gsm_bs) + gsm_bs_exit(0); #endif mISDNport_close(mISDNport); goto closeagain; @@ -1584,6 +1575,10 @@ void load_port(struct interface_port *ifport) #ifdef WITH_GSM_MS if (ifport->gsm_ms) gsm_ms_new(ifport->gsm_ms_name); +#endif +#ifdef WITH_GSM_BS + if (ifport->gsm_bs) + gsm_bs_init(); #endif } else { ifport->block = 2; /* not available */ -- cgit v1.2.3-55-g7522