aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-05-21 00:05:09 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-05-21 00:05:09 +0200
commit54e6c8b3400b376ed36fe84f28f7930d2d9ff24b (patch)
tree3492d3f96d28edd24e12ca492d8bf52c4838b324
parent21107813979ce25b5200dc75de2938fb537b6f49 (diff)
bsc: Drop the BTS instead of exiting the application
When the BTS reboots it might not want to accept our BTS Attr, do not leave the bsc_msc_ip/bsc_nitb but simply drop the BTS connection.
-rw-r--r--openbsc/src/bsc_init.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c
index da71b4f0d..5330366ce 100644
--- a/openbsc/src/bsc_init.c
+++ b/openbsc/src/bsc_init.c
@@ -567,19 +567,23 @@ static int oml_msg_nack(u_int8_t mt)
int i;
if (mt == NM_MT_SET_BTS_ATTR_NACK) {
- LOGP(DNM, LOGL_FATAL, "Failed to set BTS attributes. That is fatal. "
+ LOGP(DNM, LOGL_ERROR, "Failed to set BTS attributes. That is fatal. "
"Was the bts type and frequency properly specified?\n");
- exit(-1);
+ goto drop_bts;
} else {
LOGP(DNM, LOGL_ERROR, "Got a NACK going to drop the OML links.\n");
- for (i = 0; i < bsc_gsmnet->num_bts; ++i) {
- struct gsm_bts *bts = gsm_bts_num(bsc_gsmnet, i);
- if (is_ipaccess_bts(bts))
- ipaccess_drop_oml(bts);
- }
+ goto drop_bts;
}
return 0;
+
+drop_bts:
+ for (i = 0; i < bsc_gsmnet->num_bts; ++i) {
+ struct gsm_bts *bts = gsm_bts_num(bsc_gsmnet, i);
+ if (is_ipaccess_bts(bts))
+ ipaccess_drop_oml(bts);
+ }
+ return 0;
}
/* Callback function to be called every time we receive a signal from NM */