aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/transaction.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-03-23 07:00:22 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-03-25 09:07:28 +0100
commite95d4825f5ef6d93a4557bad6988233ba220a06a (patch)
tree43d36d260ad9d405e64e45b51dd53d377042810a /openbsc/src/transaction.c
parent68884aa156126e30e435fe4e2c5847340c61f0d3 (diff)
lchan: Change transaction to work on the GSM Subscriber Connection
Change the MSC transaction code to operate on a GSM Subscriber Connection instead of the lchan. This will help us to separate the two commands properly.
Diffstat (limited to 'openbsc/src/transaction.c')
-rw-r--r--openbsc/src/transaction.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/openbsc/src/transaction.c b/openbsc/src/transaction.c
index 95075566b..5e0d50796 100644
--- a/openbsc/src/transaction.c
+++ b/openbsc/src/transaction.c
@@ -95,10 +95,10 @@ void trans_free(struct gsm_trans *trans)
break;
}
- if (trans->lchan)
- put_subscr_con(&trans->lchan->conn);
+ if (trans->conn)
+ put_subscr_con(trans->conn);
- if (!trans->lchan && trans->subscr && trans->subscr->net) {
+ if (!trans->conn && trans->subscr && trans->subscr->net) {
/* Stop paging on all bts' */
paging_request_stop(NULL, trans->subscr, NULL);
}
@@ -148,25 +148,22 @@ int trans_assign_trans_id(struct gsm_subscriber *subscr,
/* update all transactions to use a different LCHAN, e.g.
* after handover has succeeded */
-int trans_lchan_change(struct gsm_lchan *lchan_old,
- struct gsm_lchan *lchan_new)
+int trans_lchan_change(struct gsm_subscriber_connection *conn_old,
+ struct gsm_subscriber_connection *conn_new)
{
- struct gsm_network *net = lchan_old->ts->trx->bts->network;
+ struct gsm_network *net = conn_old->lchan->ts->trx->bts->network;
struct gsm_trans *trans;
int num = 0;
llist_for_each_entry(trans, &net->trans_list, entry) {
- if (trans->lchan == lchan_old) {
- struct gsm_subscriber_connection *conn;
+ if (trans->conn == conn_old) {
/* drop old channel use count */
- conn = &trans->lchan->conn;
- put_subscr_con(conn);
+ put_subscr_con(conn_old);
/* assign new channel */
- trans->lchan = lchan_new;
+ trans->conn = conn_new;
/* bump new channel use count */
- conn = &trans->lchan->conn;
- use_subscr_con(conn);
+ use_subscr_con(conn_new);
num++;
}
}