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.
This commit is contained in:
Holger Hans Peter Freyther
2013-06-30 19:02:57 +02:00
parent eb0acb6e02
commit 8bb0720ebb

View File

@@ -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. */