aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2016-06-08 17:50:13 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-06-17 01:31:03 +0000
commit65efa691f8dc6e28239ccdc026f0bae9718fe3d6 (patch)
tree43284db21557dab856ad2392e4e2e723f4f592e6
parent6ab1ed580d8d408b46f8e181ad9e8d12a91f7d51 (diff)
oml, Set Chan Attr: treat unknown PCHAN types as error
-rw-r--r--src/common/oml.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index 86ec1bf..bee2f84 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -736,8 +736,9 @@ static int conf_lchans_for_pchan(struct gsm_bts_trx_ts *ts)
lchan->type = GSM_LCHAN_PDTCH;
break;
default:
- /* FIXME */
- break;
+ LOGP(DOML, LOGL_ERROR, "Unknown/unhandled PCHAN type: %u %s\n",
+ ts->pchan, gsm_pchan_name(ts->pchan));
+ return -NM_NACK_PARAM_RANGE;
}
return 0;
}
@@ -790,7 +791,12 @@ static int oml_rx_set_chan_attr(struct gsm_bts_trx_ts *ts, struct msgb *msg)
if (TLVP_PRESENT(&tp, NM_ATT_CHAN_COMB)) {
uint8_t comb = *TLVP_VAL(&tp, NM_ATT_CHAN_COMB);
ts->pchan = abis_nm_pchan4chcomb(comb);
- conf_lchans_for_pchan(ts);
+ rc = conf_lchans_for_pchan(ts);
+ if (rc < 0) {
+ talloc_free(tp_merged);
+ /* Send NACK */
+ return oml_fom_ack_nack(msg, -rc);
+ }
}
/* 9.4.5 ARFCN List */