aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/transaction.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-07-23 21:58:40 +0200
committerHarald Welte <laforge@gnumonks.org>2009-07-23 21:58:40 +0200
commitb8b4073e1842cd1de4b432e201865a96baa4c067 (patch)
tree010979dab509aa01a945d2c4115601c4f6da5bf0 /openbsc/src/transaction.c
parent78283ef151aa4cac6eaf9728b3df65a117108186 (diff)
look-up by (subscriber, protocol, transaction_id) tuple
... rather than the previous incomplete (lchan, transaction_id) tuple
Diffstat (limited to 'openbsc/src/transaction.c')
-rw-r--r--openbsc/src/transaction.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/openbsc/src/transaction.c b/openbsc/src/transaction.c
index f4cef28d2..9e7c7948f 100644
--- a/openbsc/src/transaction.c
+++ b/openbsc/src/transaction.c
@@ -31,13 +31,16 @@
static void *tall_trans_ctx;
-struct gsm_trans *trans_find_by_id(struct gsm_lchan *lchan, u_int8_t trans_id)
+struct gsm_trans *trans_find_by_id(struct gsm_subscriber *subscr,
+ u_int8_t proto, u_int8_t trans_id)
{
struct gsm_trans *trans;
- struct gsm_network *net = lchan->ts->trx->bts->network;
+ struct gsm_network *net = subscr->net;
llist_for_each_entry(trans, &net->trans_list, entry) {
- if (trans->lchan == lchan && trans->transaction_id == trans_id)
+ if (trans->subscr == subscr &&
+ trans->protocol == proto &&
+ trans->transaction_id == trans_id)
return trans;
}
return NULL;