aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/transaction.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-12-02 11:58:00 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-12-05 14:56:35 +0100
commitf07c605361d21b7bc36b741297c6ecf8e4162782 (patch)
tree15014ef3734dda9166e88faab97007ab8b9851f3 /openbsc/src/libmsc/transaction.c
parent1f6cce772ef1aac0ef8a66a3327d0ed9d4572366 (diff)
msc: Add net back pointer to gsm_trans
Currently the net pointer is obtained from trans->subscr->net. On the other hand, the list gsm_trans object is managed by the net object. This patch adds the back pointer to the structure and replaces all trans->subscr->net by trans->net expressions. In trans_alloc() the trans->net pointer is obtained from the subscr object. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/libmsc/transaction.c')
-rw-r--r--openbsc/src/libmsc/transaction.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/src/libmsc/transaction.c b/openbsc/src/libmsc/transaction.c
index e425e67ee..3bed67244 100644
--- a/openbsc/src/libmsc/transaction.c
+++ b/openbsc/src/libmsc/transaction.c
@@ -65,8 +65,9 @@ struct gsm_trans *trans_alloc(struct gsm_subscriber *subscr,
uint32_t callref)
{
struct gsm_trans *trans;
+ struct gsm_network *net = subscr->net;
- DEBUGP(DCC, "subscr=%p, subscr->net=%p\n", subscr, subscr->net);
+ DEBUGP(DCC, "subscr=%p, net=%p\n", subscr, net);
trans = talloc_zero(tall_trans_ctx, struct gsm_trans);
if (!trans)
@@ -79,7 +80,8 @@ struct gsm_trans *trans_alloc(struct gsm_subscriber *subscr,
trans->transaction_id = trans_id;
trans->callref = callref;
- llist_add_tail(&trans->entry, &subscr->net->trans_list);
+ trans->net = net;
+ llist_add_tail(&trans->entry, &net->trans_list);
return trans;
}