summaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-07-23 19:06:52 +0200
committerHarald Welte <laforge@gnumonks.org>2009-07-23 19:10:19 +0200
commitb3c3faee940cda77afa9ba2500afa9ae9919851e (patch)
tree8fdaf7823afd2eb034ea9c295292bad0f6138ec9 /openbsc/src
parentaa0b29c2650104b4cb06cd63f295af16fa3a3231 (diff)
remove bogus 'network' member of 'struct gsm_transaction'
Since a transaction is associated to a gsm_subscriber, and the subsciber is part of a network, we don't need to have a dedicated transaction->network pointer.
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/gsm_04_08.c65
1 files changed, 35 insertions, 30 deletions
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index 6f729e370..4359f8709 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -1894,7 +1894,7 @@ void _gsm48_cc_trans_free(struct gsm_trans *trans)
/* send release to L4, if callref still exists */
if (trans->callref) {
/* Ressource unavailable */
- mncc_release_ind(trans->network, trans, trans->callref,
+ mncc_release_ind(trans->subscr->net, trans, trans->callref,
GSM48_CAUSE_LOC_PRN_S_LU,
GSM48_CC_CAUSE_RESOURCE_UNAVAIL);
}
@@ -1950,7 +1950,8 @@ static int setup_trig_pag_evt(unsigned int hooknum, unsigned int event,
DEBUGP(DCC, "Paging subscr %s expired!\n",
subscr->extension);
/* Temporarily out of order */
- mncc_release_ind(transt->network, transt, transt->callref,
+ mncc_release_ind(transt->subscr->net, transt,
+ transt->callref,
GSM48_CAUSE_LOC_PRN_S_LU,
GSM48_CC_CAUSE_DEST_OOO);
transt->callref = 0;
@@ -2125,7 +2126,7 @@ static void gsm48_cc_timeout(void *arg)
if (release && trans->callref) {
/* process release towards layer 4 */
- mncc_release_ind(trans->network, trans, trans->callref,
+ mncc_release_ind(trans->subscr->net, trans, trans->callref,
l4_location, l4_cause);
trans->callref = 0;
}
@@ -2133,7 +2134,7 @@ static void gsm48_cc_timeout(void *arg)
if (disconnect && trans->callref) {
/* process disconnect towards layer 4 */
mncc_set_cause(&l4_rel, l4_location, l4_cause);
- mncc_recvmsg(trans->network, trans, MNCC_DISC_IND, &l4_rel);
+ mncc_recvmsg(trans->subscr->net, trans, MNCC_DISC_IND, &l4_rel);
}
/* process disconnect towards mobile station */
@@ -2234,7 +2235,7 @@ static int gsm48_cc_rx_setup(struct gsm_trans *trans, struct msgb *msg)
new_cc_state(trans, GSM_CSTATE_INITIATED);
/* indicate setup to MNCC */
- mncc_recvmsg(trans->network, trans, MNCC_SETUP_IND, &setup);
+ mncc_recvmsg(trans->subscr->net, trans, MNCC_SETUP_IND, &setup);
return 0;
}
@@ -2255,7 +2256,7 @@ static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg)
DEBUGP(DCC, "TX Setup with assigned transaction. "
"This is not allowed!\n");
/* Temporarily out of order */
- rc = mncc_release_ind(trans->network, trans, trans->callref,
+ rc = mncc_release_ind(trans->subscr->net, trans, trans->callref,
GSM48_CAUSE_LOC_PRN_S_LU,
GSM48_CC_CAUSE_RESOURCE_UNAVAIL);
trans->callref = 0;
@@ -2264,7 +2265,7 @@ static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg)
}
/* Get free transaction_id */
- llist_for_each_entry(transt, &trans->network->trans_list, entry) {
+ llist_for_each_entry(transt, &trans->subscr->net->trans_list, entry) {
/* Transaction of our lchan? */
if (transt->lchan == trans->lchan &&
transt->transaction_id != 0xff)
@@ -2273,7 +2274,7 @@ static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg)
/* Assign free transaction ID */
if ((trans_id_mask & 0x007f) == 0x7f) {
/* no free transaction ID */
- rc = mncc_release_ind(trans->network, trans, trans->callref,
+ rc = mncc_release_ind(trans->subscr->net, trans, trans->callref,
GSM48_CAUSE_LOC_PRN_S_LU,
GSM48_CC_CAUSE_RESOURCE_UNAVAIL);
trans->callref = 0;
@@ -2364,7 +2365,8 @@ static int gsm48_cc_rx_call_conf(struct gsm_trans *trans, struct msgb *msg)
new_cc_state(trans, GSM_CSTATE_MO_TERM_CALL_CONF);
- return mncc_recvmsg(trans->network, trans, MNCC_CALL_CONF_IND, &call_conf);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_CALL_CONF_IND,
+ &call_conf);
}
static int gsm48_cc_tx_call_proc(struct gsm_trans *trans, void *arg)
@@ -2427,7 +2429,8 @@ static int gsm48_cc_rx_alerting(struct gsm_trans *trans, struct msgb *msg)
new_cc_state(trans, GSM_CSTATE_CALL_RECEIVED);
- return mncc_recvmsg(trans->network, trans, MNCC_ALERT_IND, &alerting);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_ALERT_IND,
+ &alerting);
}
static int gsm48_cc_tx_alerting(struct gsm_trans *trans, void *arg)
@@ -2546,7 +2549,7 @@ static int gsm48_cc_rx_connect(struct gsm_trans *trans, struct msgb *msg)
new_cc_state(trans, GSM_CSTATE_CONNECT_REQUEST);
- return mncc_recvmsg(trans->network, trans, MNCC_SETUP_CNF, &connect);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_SETUP_CNF, &connect);
}
@@ -2560,7 +2563,7 @@ static int gsm48_cc_rx_connect_ack(struct gsm_trans *trans, struct msgb *msg)
memset(&connect_ack, 0, sizeof(struct gsm_mncc));
connect_ack.callref = trans->callref;
- return mncc_recvmsg(trans->network, trans, MNCC_SETUP_COMPL_IND,
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_SETUP_COMPL_IND,
&connect_ack);
}
@@ -2617,7 +2620,7 @@ static int gsm48_cc_rx_disconnect(struct gsm_trans *trans, struct msgb *msg)
TLVP_VAL(&tp, GSM48_IE_SS_VERS)-1);
}
- return mncc_recvmsg(trans->network, trans, MNCC_DISC_IND, &disc);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_DISC_IND, &disc);
}
@@ -2708,11 +2711,12 @@ static int gsm48_cc_rx_release(struct gsm_trans *trans, struct msgb *msg)
if (trans->cc.state == GSM_CSTATE_RELEASE_REQ) {
/* release collision 5.4.5 */
- rc = mncc_recvmsg(trans->network, trans, MNCC_REL_CNF, &rel);
+ rc = mncc_recvmsg(trans->subscr->net, trans, MNCC_REL_CNF, &rel);
} else {
- rc = gsm48_tx_simple(msg->lchan, GSM48_PDISC_CC | trans->transaction_id,
- GSM48_MT_CC_RELEASE_COMPL);
- rc = mncc_recvmsg(trans->network, trans, MNCC_REL_IND, &rel);
+ rc = gsm48_tx_simple(msg->lchan,
+ GSM48_PDISC_CC | trans->transaction_id,
+ GSM48_MT_CC_RELEASE_COMPL);
+ rc = mncc_recvmsg(trans->subscr->net, trans, MNCC_REL_IND, &rel);
}
new_cc_state(trans, GSM_CSTATE_NULL);
@@ -2798,15 +2802,15 @@ static int gsm48_cc_rx_release_compl(struct gsm_trans *trans, struct msgb *msg)
if (trans->callref) {
switch (trans->cc.state) {
case GSM_CSTATE_CALL_PRESENT:
- rc = mncc_recvmsg(trans->network, trans,
+ rc = mncc_recvmsg(trans->subscr->net, trans,
MNCC_REJ_IND, &rel);
break;
case GSM_CSTATE_RELEASE_REQ:
- rc = mncc_recvmsg(trans->network, trans,
+ rc = mncc_recvmsg(trans->subscr->net, trans,
MNCC_REL_CNF, &rel);
break;
default:
- rc = mncc_recvmsg(trans->network, trans,
+ rc = mncc_recvmsg(trans->subscr->net, trans,
MNCC_REL_IND, &rel);
}
}
@@ -2869,7 +2873,7 @@ static int gsm48_cc_rx_facility(struct gsm_trans *trans, struct msgb *msg)
TLVP_VAL(&tp, GSM48_IE_SS_VERS)-1);
}
- return mncc_recvmsg(trans->network, trans, MNCC_FACILITY_IND, &fac);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_FACILITY_IND, &fac);
}
static int gsm48_cc_tx_facility(struct gsm_trans *trans, void *arg)
@@ -2894,7 +2898,7 @@ static int gsm48_cc_rx_hold(struct gsm_trans *trans, struct msgb *msg)
memset(&hold, 0, sizeof(struct gsm_mncc));
hold.callref = trans->callref;
- return mncc_recvmsg(trans->network, trans, MNCC_HOLD_IND, &hold);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_HOLD_IND, &hold);
}
static int gsm48_cc_tx_hold_ack(struct gsm_trans *trans, void *arg)
@@ -2934,7 +2938,8 @@ static int gsm48_cc_rx_retrieve(struct gsm_trans *trans, struct msgb *msg)
memset(&retrieve, 0, sizeof(struct gsm_mncc));
retrieve.callref = trans->callref;
- return mncc_recvmsg(trans->network, trans, MNCC_RETRIEVE_IND, &retrieve);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_RETRIEVE_IND,
+ &retrieve);
}
static int gsm48_cc_tx_retrieve_ack(struct gsm_trans *trans, void *arg)
@@ -2985,7 +2990,7 @@ static int gsm48_cc_rx_start_dtmf(struct gsm_trans *trans, struct msgb *msg)
TLVP_VAL(&tp, GSM48_IE_KPD_FACILITY)-1);
}
- return mncc_recvmsg(trans->network, trans, MNCC_START_DTMF_IND, &dtmf);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_START_DTMF_IND, &dtmf);
}
static int gsm48_cc_tx_start_dtmf_ack(struct gsm_trans *trans, void *arg)
@@ -3043,7 +3048,7 @@ static int gsm48_cc_rx_stop_dtmf(struct gsm_trans *trans, struct msgb *msg)
memset(&dtmf, 0, sizeof(struct gsm_mncc));
dtmf.callref = trans->callref;
- return mncc_recvmsg(trans->network, trans, MNCC_STOP_DTMF_IND, &dtmf);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_STOP_DTMF_IND, &dtmf);
}
static int gsm48_cc_rx_modify(struct gsm_trans *trans, struct msgb *msg)
@@ -3065,7 +3070,7 @@ static int gsm48_cc_rx_modify(struct gsm_trans *trans, struct msgb *msg)
new_cc_state(trans, GSM_CSTATE_MO_ORIG_MODIFY);
- return mncc_recvmsg(trans->network, trans, MNCC_MODIFY_IND, &modify);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_MODIFY_IND, &modify);
}
static int gsm48_cc_tx_modify(struct gsm_trans *trans, void *arg)
@@ -3109,7 +3114,7 @@ static int gsm48_cc_rx_modify_complete(struct gsm_trans *trans, struct msgb *msg
new_cc_state(trans, GSM_CSTATE_ACTIVE);
- return mncc_recvmsg(trans->network, trans, MNCC_MODIFY_CNF, &modify);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_MODIFY_CNF, &modify);
}
static int gsm48_cc_tx_modify_complete(struct gsm_trans *trans, void *arg)
@@ -3157,7 +3162,7 @@ static int gsm48_cc_rx_modify_reject(struct gsm_trans *trans, struct msgb *msg)
new_cc_state(trans, GSM_CSTATE_ACTIVE);
- return mncc_recvmsg(trans->network, trans, MNCC_MODIFY_REJ, &modify);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_MODIFY_REJ, &modify);
}
static int gsm48_cc_tx_modify_reject(struct gsm_trans *trans, void *arg)
@@ -3209,7 +3214,7 @@ static int gsm48_cc_rx_notify(struct gsm_trans *trans, struct msgb *msg)
if (payload_len >= 1)
decode_notify(&notify.notify, gh->data);
- return mncc_recvmsg(trans->network, trans, MNCC_NOTIFY_IND, &notify);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_NOTIFY_IND, &notify);
}
static int gsm48_cc_tx_userinfo(struct gsm_trans *trans, void *arg)
@@ -3252,7 +3257,7 @@ static int gsm48_cc_rx_userinfo(struct gsm_trans *trans, struct msgb *msg)
if (TLVP_PRESENT(&tp, GSM48_IE_MORE_DATA))
user.more = 1;
- return mncc_recvmsg(trans->network, trans, MNCC_USERINFO_IND, &user);
+ return mncc_recvmsg(trans->subscr->net, trans, MNCC_USERINFO_IND, &user);
}
static int gsm48_lchan_modify(struct gsm_trans *trans, void *arg)