From 6e670aab5af6a355ea69edafb5d4f8adf387557a Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 7 Jan 2010 20:44:32 +0100 Subject: introduce new gsm_bts_trx_by_nr() function --- openbsc/src/gsm_data.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'openbsc/src/gsm_data.c') diff --git a/openbsc/src/gsm_data.c b/openbsc/src/gsm_data.c index 446a82011..d2676db1b 100644 --- a/openbsc/src/gsm_data.c +++ b/openbsc/src/gsm_data.c @@ -365,6 +365,17 @@ const char *btstype2str(enum gsm_bts_type type) return bts_types[type]; } +struct gsm_bts_trx *gsm_bts_trx_by_nr(struct gsm_bts *bts, int nr) +{ + struct gsm_bts_trx *trx; + + llist_for_each_entry(trx, &bts->trx_list, list) { + if (trx->nr == nr) + return trx; + } + return NULL; +} + /* Search for a BTS in the given Location Area; optionally start searching * with start_bts (for continuing to search after the first result) */ struct gsm_bts *gsm_bts_by_lac(struct gsm_network *net, unsigned int lac, -- cgit v1.2.3