sms: Kill the linkid as we are using SAPI=3 all the time

For GSM (not GPRS) we will never use a SAPI!=3. Simplify the code
and remove the link_id=0.
This commit is contained in:
Holger Hans Peter Freyther 2012-11-24 17:13:56 +01:00
parent bc6c43f759
commit 536a10b63b
2 changed files with 3 additions and 7 deletions

View File

@ -48,8 +48,6 @@ struct gsm_trans {
struct gsm_mncc msg; /* stores setup/disconnect/release message */
} cc;
struct {
uint8_t link_id; /* RSL Link ID to be used for this trans */
struct gsm411_smc_inst smc_inst;
struct gsm411_smr_inst smr_inst;

View File

@ -122,11 +122,11 @@ static void send_signal(int sig_no,
osmo_signal_dispatch(SS_SMS, sig_no, &sig);
}
static int gsm411_sendmsg(struct gsm_subscriber_connection *conn, struct msgb *msg, uint8_t link_id)
static int gsm411_sendmsg(struct gsm_subscriber_connection *conn, struct msgb *msg)
{
DEBUGP(DLSMS, "GSM4.11 TX %s\n", osmo_hexdump(msg->data, msg->len));
msg->l3h = msg->data;
return gsm0808_submit_dtap(conn, msg, link_id, 1);
return gsm0808_submit_dtap(conn, msg, UM_SAPI_SMS, 1);
}
/* Prefix msg with a 04.08/04.11 CP header */
@ -142,7 +142,7 @@ static int gsm411_cp_sendmsg(struct msgb *msg, struct gsm_trans *trans,
DEBUGP(DLSMS, "sending CP message (trans=%x)\n", trans->transaction_id);
return gsm411_sendmsg(trans->conn, msg, trans->sms.link_id);
return gsm411_sendmsg(trans->conn, msg);
}
/* mm_send: receive MMCCSMS sap message from SMC */
@ -774,7 +774,6 @@ int gsm0411_rcv_sms(struct gsm_subscriber_connection *conn,
gsm411_mn_recv, gsm411_mm_send);
gsm411_smr_init(&trans->sms.smr_inst, 0, 1,
gsm411_rl_recv, gsm411_mn_send);
trans->sms.link_id = UM_SAPI_SMS;
trans->conn = conn;
@ -851,7 +850,6 @@ int gsm411_send_sms(struct gsm_subscriber_connection *conn, struct gsm_sms *sms)
gsm411_smr_init(&trans->sms.smr_inst, sms->id, 1,
gsm411_rl_recv, gsm411_mn_send);
trans->sms.sms = sms;
trans->sms.link_id = UM_SAPI_SMS; /* FIXME: main or SACCH ? */
trans->conn = conn;