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.
This commit is contained in:
parent
dcaf5654db
commit
596fed40f0
|
@ -104,9 +104,6 @@ struct gsm_trans {
|
|||
/* Entry in list of all transactions */
|
||||
struct llist_head entry;
|
||||
|
||||
/* Network */
|
||||
struct gsm_network *network;
|
||||
|
||||
/* The protocol within which we live */
|
||||
u_int8_t protocol;
|
||||
|
||||
|
|
|
@ -1900,7 +1900,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);
|
||||
}
|
||||
|
@ -1956,7 +1956,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;
|
||||
|
@ -2131,7 +2132,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;
|
||||
}
|
||||
|
@ -2139,7 +2140,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 */
|
||||
|
@ -2240,7 +2241,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;
|
||||
}
|
||||
|
@ -2261,7 +2262,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;
|
||||
|
@ -2270,7 +2271,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)
|
||||
|
@ -2279,7 +2280,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;
|
||||
|
@ -2370,7 +2371,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)
|
||||
|
@ -2433,7 +2435,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)
|
||||
|
@ -2552,7 +2555,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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2566,7 +2569,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);
|
||||
}
|
||||
|
||||
|
@ -2623,7 +2626,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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -2714,11 +2717,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);
|
||||
|
@ -2804,15 +2808,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);
|
||||
}
|
||||
}
|
||||
|
@ -2875,7 +2879,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)
|
||||
|
@ -2900,7 +2904,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)
|
||||
|
@ -2940,7 +2944,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)
|
||||
|
@ -2991,7 +2996,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)
|
||||
|
@ -3049,7 +3054,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)
|
||||
|
@ -3071,7 +3076,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)
|
||||
|
@ -3115,7 +3120,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)
|
||||
|
@ -3163,7 +3168,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)
|
||||
|
@ -3215,7 +3220,7 @@ static int gsm48_cc_rx_notify(struct gsm_trans *trans, struct msgb *msg)
|
|||
if (payload_len >= 1)
|
||||
decode_notify(¬ify.notify, gh->data);
|
||||
|
||||
return mncc_recvmsg(trans->network, trans, MNCC_NOTIFY_IND, ¬ify);
|
||||
return mncc_recvmsg(trans->subscr->net, trans, MNCC_NOTIFY_IND, ¬ify);
|
||||
}
|
||||
|
||||
static int gsm48_cc_tx_userinfo(struct gsm_trans *trans, void *arg)
|
||||
|
@ -3258,7 +3263,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)
|
||||
|
|
Loading…
Reference in New Issue