aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/include/openbsc/transaction.h3
-rw-r--r--openbsc/src/gsm_04_08.c2
-rw-r--r--openbsc/src/transaction.c9
3 files changed, 9 insertions, 5 deletions
diff --git a/openbsc/include/openbsc/transaction.h b/openbsc/include/openbsc/transaction.h
index 1450dbca5..39ed50035 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 a16b0de6e..a5c562faf 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -3544,7 +3544,7 @@ static int gsm0408_rcv_cc(struct msgb *msg)
}
/* 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 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;