From 8bb0720ebb56c595b6fdccbfc6c611387a82cfe5 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 30 Jun 2013 19:02:57 +0200 Subject: 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. --- openbsc/src/libbsc/bts_ipaccess_nanobts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc') diff --git a/openbsc/src/libbsc/bts_ipaccess_nanobts.c b/openbsc/src/libbsc/bts_ipaccess_nanobts.c index 4bf937b0a..c8b235d56 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. */ -- cgit v1.2.3