diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-03 01:48:45 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-03 01:48:45 +0800 |
commit | 55982ca9a73b29db09a711db70ff90f6f8f4ee0b (patch) | |
tree | c08f3a69aa09efaf3a1d66ccc8ae06add8f50d7e | |
parent | 91a035d2fbdd1f36fcfcb5671b08982baa8d4809 (diff) |
oml: In case we get a NACK, drop the OML connection and hope for the best
Assume that a NACK is a onetime failure and that on the next
attempt it will work better. If that is not the case we might
even send a reboot to the BTS.
-rw-r--r-- | openbsc/src/bsc_init.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c index 1c4c829e4..abfbb5af8 100644 --- a/openbsc/src/bsc_init.c +++ b/openbsc/src/bsc_init.c @@ -33,6 +33,7 @@ #include <openbsc/signal.h> #include <openbsc/chan_alloc.h> #include <osmocore/talloc.h> +#include <openbsc/ipaccess.h> /* global pointer to the gsm network data structure */ extern struct gsm_network *bsc_gsmnet; @@ -563,10 +564,19 @@ static int sw_activ_rep(struct msgb *mb) /* Callback function for NACK on the OML NM */ 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. " "Was the bts type and frequency properly specified?\n"); exit(-1); + } 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); + } } return 0; |