summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/gsm_04_11.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-11-15 20:47:26 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-12-01 11:33:00 +0100
commit07dec137deaf5505564fdacec5f3b83ee9399a39 (patch)
tree8f4988c54f69d2c3dd516959aa42a129e6e34d4e /openbsc/src/libmsc/gsm_04_11.c
parent70ae5d3000edd12aee38497a6f541595a8c7dee8 (diff)
sms: Remove the susbcr_put_lchan logic from the SMS code
This should and does happen as part of the trans_free/msc_release_connection code. There is no easy way to determine that the lchan is now 'free' for other things.. Let the transaction code sort this out. This code just needs to make sure that transactions are always freed.
Diffstat (limited to 'openbsc/src/libmsc/gsm_04_11.c')
-rw-r--r--openbsc/src/libmsc/gsm_04_11.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c
index be6b5b0..31a72b6 100644
--- a/openbsc/src/libmsc/gsm_04_11.c
+++ b/openbsc/src/libmsc/gsm_04_11.c
@@ -169,19 +169,6 @@ static void send_signal(int sig_no,
osmo_signal_dispatch(SS_SMS, sig_no, &sig);
}
-/*
- * This should be called whenever all SMS to a given subscriber
- * on a given connection has been sent. This will inform the higher
- * layers that a channel can be given up.
- */
-static void gsm411_release_conn(struct gsm_subscriber_connection *conn)
-{
- if (!conn)
- return;
-
- subscr_put_channel(conn->subscr);
-}
-
struct msgb *gsm411_msgb_alloc(void)
{
return msgb_alloc_headroom(GSM411_ALLOC_SIZE, GSM411_ALLOC_HEADROOM,
@@ -618,8 +605,6 @@ static int gsm411_rx_rp_ack(struct msgb *msg, struct gsm_trans *trans,
sms = db_sms_get_unsent_for_subscr(trans->subscr);
if (sms)
gsm411_send_sms(trans->conn, sms);
- else
- gsm411_release_conn(trans->conn);
/* free the transaction here */
trans_free(trans);
@@ -695,8 +680,6 @@ static int gsm411_rx_rp_smma(struct msgb *msg, struct gsm_trans *trans,
sms = db_sms_get_unsent_for_subscr(trans->subscr);
if (sms)
gsm411_send_sms(trans->conn, sms);
- else
- gsm411_release_conn(trans->conn);
return rc;
}
@@ -1032,11 +1015,9 @@ void _gsm411_sms_trans_free(struct gsm_trans *trans)
void gsm411_sapi_n_reject(struct gsm_subscriber_connection *conn)
{
- struct gsm_subscriber *subscr;
struct gsm_network *net;
struct gsm_trans *trans, *tmp;
- subscr = subscr_get(conn->subscr);
net = conn->bts->network;
llist_for_each_entry_safe(trans, tmp, &net->trans_list, entry)
@@ -1052,8 +1033,5 @@ void gsm411_sapi_n_reject(struct gsm_subscriber_connection *conn)
trans->sms.sms = NULL;
trans_free(trans);
}
-
- subscr_put_channel(subscr);
- subscr_put(subscr);
}