aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libmsc/transaction.c')
-rw-r--r--openbsc/src/libmsc/transaction.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/openbsc/src/libmsc/transaction.c b/openbsc/src/libmsc/transaction.c
index 4b46e22ae..053716dcd 100644
--- a/openbsc/src/libmsc/transaction.c
+++ b/openbsc/src/libmsc/transaction.c
@@ -61,6 +61,24 @@ struct gsm_trans *trans_find_by_callref(struct gsm_network *net,
return NULL;
}
+struct gsm_trans *trans_find_by_lchan(struct gsm_lchan *lchan)
+{
+ struct gsm_trans *tmp;
+ struct gsm_trans *trans = NULL;
+ struct gsm_network *net = lchan->ts->trx->bts->network;
+
+ llist_for_each_entry(tmp, &net->trans_list, entry) {
+ if (!tmp->conn)
+ continue;
+ if (tmp->conn->lchan != lchan && tmp->conn->ho_lchan != lchan)
+ continue;
+ trans = tmp;
+ break;
+ }
+
+ return trans;
+}
+
struct gsm_trans *trans_alloc(struct gsm_network *net,
struct gsm_subscriber *subscr,
uint8_t protocol, uint8_t trans_id,