aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/signal.h1
-rw-r--r--openbsc/src/abis_nm.c3
-rw-r--r--openbsc/src/bsc_hack.c14
3 files changed, 18 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/signal.h b/openbsc/include/openbsc/signal.h
index 4a583f689..c065f9003 100644
--- a/openbsc/include/openbsc/signal.h
+++ b/openbsc/include/openbsc/signal.h
@@ -54,6 +54,7 @@ enum signal_abisip {
enum signal_nm {
S_NM_SW_ACTIV_REP, /* GSM 12.21 software activated report */
S_NM_FAIL_REP, /* GSM 12.21 failure event report */
+ S_NM_NACK, /* GSM 12.21 various NM_MT_*_NACK happened */
};
/* SS_LCHAN signals */
diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c
index 74dba2377..83e6bbb48 100644
--- a/openbsc/src/abis_nm.c
+++ b/openbsc/src/abis_nm.c
@@ -893,6 +893,9 @@ static int abis_nm_rcvmsg_fom(struct msgb *mb)
nack_cause_name(*TLVP_VAL(&tp, NM_ATT_NACK_CAUSES)));
else
DEBUGPC(DNM, "\n");
+
+ dispatch_signal(SS_NM, S_NM_NACK, (void*) ((long)mt));
+ return 0;
}
#if 0
/* check if last message is to be acked */
diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c
index 687be33cf..388840793 100644
--- a/openbsc/src/bsc_hack.c
+++ b/openbsc/src/bsc_hack.c
@@ -454,6 +454,18 @@ static int sw_activ_rep(struct msgb *mb)
return 0;
}
+/* Callback function for NACK on the OML NM */
+static int oml_msg_nack(int mt)
+{
+ if (mt == NM_MT_SET_BTS_ATTR_NACK) {
+ fprintf(stderr, "Failed to set BTS attributes. That is fatal. "
+ "Was the bts type and frequency properly specified?\n");
+ exit(-1);
+ }
+
+ return 0;
+}
+
/* Callback function to be called every time we receive a signal from NM */
static int nm_sig_cb(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data)
@@ -461,6 +473,8 @@ static int nm_sig_cb(unsigned int subsys, unsigned int signal,
switch (signal) {
case S_NM_SW_ACTIV_REP:
return sw_activ_rep(signal_data);
+ case S_NM_NACK:
+ return oml_msg_nack((int)signal_data);
default:
break;
}