aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/abis_om2000.c
diff options
context:
space:
mode:
authorPhilipp <pmaier@sysmocom.de>2016-10-20 13:55:21 +0200
committerHarald Welte <laforge@gnumonks.org>2016-11-09 15:43:34 +0000
commitb4ecc1d43b147d7b42ba4822727b713ce5074794 (patch)
tree8f6ea2ef79cb6ac4c54f5e4a81550aa22afb9820 /openbsc/src/libbsc/abis_om2000.c
parent6bbcfbb78c1024c8e32598ca068bd06c586aaac9 (diff)
OM2000: Throw error when MO can not be enabled
Throw warning message in case the MO state does not change to enabled after sendeing an Enable-Request message. Change-Id: Idfde8d6f71526e8acfea51835732515a4bee858e
Diffstat (limited to 'openbsc/src/libbsc/abis_om2000.c')
-rw-r--r--openbsc/src/libbsc/abis_om2000.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c
index 357e2e515..1ab77b192 100644
--- a/openbsc/src/libbsc/abis_om2000.c
+++ b/openbsc/src/libbsc/abis_om2000.c
@@ -2368,6 +2368,16 @@ static int process_mo_state(struct gsm_bts *bts, struct om2k_decoded_msg *odm)
get_value_string(om2k_msgcode_vals, odm->msg_type),
get_value_string(om2k_mostate_vals, mo_state));
+ /* Throw error message in case we see an enable rsponse that does
+ * not yield an enabled mo-state */
+ if (odm->msg_type == OM2K_MSGT_ENABLE_RES
+ && mo_state != OM2K_MO_S_ENABLED) {
+ LOGP(DNM, LOGL_ERROR,
+ "Rx MO=%s %s Failed to enable MO State!\n",
+ om2k_mo_name(&odm->o2h.mo),
+ get_value_string(om2k_msgcode_vals, odm->msg_type));
+ }
+
update_mo_state(bts, &odm->o2h.mo, mo_state);
return 0;