lchan: Create a structure for MSC data of the lchan
Prepare to split the BSC and the MSC part by putting the
MSC data for a connection into a "gsm_subscriber_connection"
struct and renaming the macros.
diff --git a/openbsc/src/transaction.c b/openbsc/src/transaction.c
index 75a279d..9507556 100644
--- a/openbsc/src/transaction.c
+++ b/openbsc/src/transaction.c
@@ -96,7 +96,7 @@
}
if (trans->lchan)
- put_lchan(trans->lchan);
+ put_subscr_con(&trans->lchan->conn);
if (!trans->lchan && trans->subscr && trans->subscr->net) {
/* Stop paging on all bts' */
@@ -157,12 +157,16 @@
llist_for_each_entry(trans, &net->trans_list, entry) {
if (trans->lchan == lchan_old) {
- /* drop old channel use cound */
- put_lchan(trans->lchan);
+ struct gsm_subscriber_connection *conn;
+
+ /* drop old channel use count */
+ conn = &trans->lchan->conn;
+ put_subscr_con(conn);
/* assign new channel */
trans->lchan = lchan_new;
/* bump new channel use count */
- use_lchan(trans->lchan);
+ conn = &trans->lchan->conn;
+ use_subscr_con(conn);
num++;
}
}