summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-06-30 19:02:57 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-06-30 20:11:46 +0200
commit8bb0720ebb56c595b6fdccbfc6c611387a82cfe5 (patch)
tree136ca4eac922d17f21402c3be34b527949616811
parenteb0acb6e029f4dcacd0da174f540cf0e1685b314 (diff)
nanobts: Do not crash on an invalid TRX number
In case the specified trx number is not configured, do not crash but return NULL from the function. The libosmo-abis library should close the connection for us then.
-rw-r--r--openbsc/src/libbsc/bts_ipaccess_nanobts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/bts_ipaccess_nanobts.c b/openbsc/src/libbsc/bts_ipaccess_nanobts.c
index 4bf937b..c8b235d 100644
--- a/openbsc/src/libbsc/bts_ipaccess_nanobts.c
+++ b/openbsc/src/libbsc/bts_ipaccess_nanobts.c
@@ -559,7 +559,7 @@ ipaccess_sign_link_up(void *unit_data, struct e1inp_line *line,
struct gsm_bts_trx *trx = gsm_bts_trx_num(bts, dev->trx_id);
/* no OML link set yet? give up. */
- if (!bts->oml_link)
+ if (!bts->oml_link || !trx)
return NULL;
/* remove old RSL link for this TRX. */