aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bts_ipaccess_nanobts.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-11-07 09:54:57 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-11-07 09:54:57 +0100
commit33f2c4d898c59a05c8122fd9897cbd22f643b367 (patch)
tree133e24345ac0ed9803ce4fdaa9ddfc04d671dc52 /openbsc/src/libbsc/bts_ipaccess_nanobts.c
parent1464a121c02786b0b7a9ea7b92f33aeacf187c55 (diff)
bts: Fail OML in case the channel combination is wrong
In case a BTS is being bootstrapped and one TS can not be activated prevent the whole BTS from coming up. When the OML activation is not being done the rest of the BSC code still assumes these logical channel(s) to be available and one will see channel activation issues that might be hard to debug. Instead of having a half-configured system up and running, keep the BTS offline.
Diffstat (limited to 'openbsc/src/libbsc/bts_ipaccess_nanobts.c')
-rw-r--r--openbsc/src/libbsc/bts_ipaccess_nanobts.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/bts_ipaccess_nanobts.c b/openbsc/src/libbsc/bts_ipaccess_nanobts.c
index fc7bf2897..9fa03bfe6 100644
--- a/openbsc/src/libbsc/bts_ipaccess_nanobts.c
+++ b/openbsc/src/libbsc/bts_ipaccess_nanobts.c
@@ -38,6 +38,7 @@
#include <osmocom/gsm/ipa.h>
#include <osmocom/abis/ipaccess.h>
#include <osmocom/core/logging.h>
+#include <openbsc/ipaccess.h>
extern struct gsm_network *bsc_gsmnet;
@@ -354,7 +355,10 @@ static int nm_statechg_event(int evt, struct nm_statechg_signal_data *nsd)
new_state->availability == NM_AVSTATE_DEPENDENCY) {
enum abis_nm_chan_comb ccomb =
abis_nm_chcomb4pchan(ts->pchan);
- abis_nm_set_channel_attr(ts, ccomb);
+ if (abis_nm_set_channel_attr(ts, ccomb) == -EINVAL) {
+ ipaccess_drop_oml(trx->bts);
+ return -1;
+ }
abis_nm_chg_adm_state(trx->bts, obj_class,
trx->bts->bts_nr, trx->nr, ts->nr,
NM_STATE_UNLOCKED);