aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-12-21 16:56:28 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-12-21 17:00:46 +0100
commit17c24c905785f967161dacde8b849c5b1ad275c4 (patch)
tree528d72e74a8ad2ec783321351efbea0e83f5e0d5
parentb720bd3678b461b1973d194ba51f4c824dc4c98c (diff)
[abis] Properly compare obj_inst->trx_nr to bts->num_trx
* Use >= in this case as we start counting the trx from 0 * This is fixing a problem with multi trx config
-rw-r--r--openbsc/src/abis_nm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c
index e7e3bf00..fc00ca8d 100644
--- a/openbsc/src/abis_nm.c
+++ b/openbsc/src/abis_nm.c
@@ -635,7 +635,7 @@ objclass2nmstate(struct gsm_bts *bts, u_int8_t obj_class,
nm_state = &trx->bb_transc.nm_state;
break;
case NM_OC_CHANNEL:
- if (obj_inst->trx_nr > bts->num_trx) {
+ if (obj_inst->trx_nr >= bts->num_trx) {
DEBUGPC(DNM, "TRX %u does not exist ", obj_inst->trx_nr);
return NULL;
}
@@ -719,7 +719,7 @@ objclass2obj(struct gsm_bts *bts, u_int8_t obj_class,
obj = &trx->bb_transc;
break;
case NM_OC_CHANNEL:
- if (obj_inst->trx_nr > bts->num_trx) {
+ if (obj_inst->trx_nr >= bts->num_trx) {
DEBUGPC(DNM, "TRX %u does not exist ", obj_inst->trx_nr);
return NULL;
}