look-up by (subscriber, protocol, transaction_id) tuple
... rather than the previous incomplete (lchan, transaction_id) tuple
diff --git a/openbsc/include/openbsc/transaction.h b/openbsc/include/openbsc/transaction.h
index 1450dbc..39ed500 100644
--- a/openbsc/include/openbsc/transaction.h
+++ b/openbsc/include/openbsc/transaction.h
@@ -4,7 +4,8 @@
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_subscriber.h>
-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_find_by_callref(struct gsm_network *net,
u_int32_t callref);
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index a16b0de..a5c562f 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -3544,7 +3544,7 @@
}
/* Find transaction */
- trans = trans_find_by_id(lchan, transaction_id);
+ trans = trans_find_by_id(lchan->subscr, GSM48_PDISC_CC, transaction_id);
DEBUGP(DCC, "(bts %d trx %d ts %d ti %x sub %s) "
"Received '%s' from MS in state %d (%s)\n",
diff --git a/openbsc/src/transaction.c b/openbsc/src/transaction.c
index f4cef28..9e7c794 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;