look-up by (subscriber, protocol, transaction_id) tuple
... rather than the previous incomplete (lchan, transaction_id) tuple
This commit is contained in:
parent
78283ef151
commit
b8b4073e18
|
@ -4,7 +4,8 @@
|
||||||
#include <openbsc/gsm_data.h>
|
#include <openbsc/gsm_data.h>
|
||||||
#include <openbsc/gsm_subscriber.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,
|
struct gsm_trans *trans_find_by_callref(struct gsm_network *net,
|
||||||
u_int32_t callref);
|
u_int32_t callref);
|
||||||
|
|
||||||
|
|
|
@ -3544,7 +3544,7 @@ static int gsm0408_rcv_cc(struct msgb *msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find transaction */
|
/* 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) "
|
DEBUGP(DCC, "(bts %d trx %d ts %d ti %x sub %s) "
|
||||||
"Received '%s' from MS in state %d (%s)\n",
|
"Received '%s' from MS in state %d (%s)\n",
|
||||||
|
|
|
@ -31,13 +31,16 @@
|
||||||
|
|
||||||
static void *tall_trans_ctx;
|
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_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) {
|
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 trans;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue