aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_04_11.c
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2009-09-27 11:16:22 +0200
committerHarald Welte <laforge@gnumonks.org>2009-09-27 11:16:22 +0200
commit6b0b103bdcfaf15ca1c33d3c61f211cb40661e92 (patch)
tree32eeeeedf57a07aa3dc2920a5d8b2dc91fee4867 /openbsc/src/gsm_04_11.c
parent23b710fa4f424f6e6afd4c1e2cea38f3767d8b5d (diff)
[gsm_04_11] Free transaction on RX_RP_ACK for SMS
When only one SMS is sent, the freeing of the lchan will automatically free all transactions on the lchan. However, if there are several SMS sent at once, the call to gsm411_send_sms_lchan will create a new transaction with the same caracteristics as the previous one. If the old one is not free'd, the next call to trans_find_by_id (triggered by the next incoming RP-ACK) will not return the good transaction and things go haywire. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'openbsc/src/gsm_04_11.c')
-rw-r--r--openbsc/src/gsm_04_11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/gsm_04_11.c b/openbsc/src/gsm_04_11.c
index 85fd6b690..59020746f 100644
--- a/openbsc/src/gsm_04_11.c
+++ b/openbsc/src/gsm_04_11.c
@@ -650,7 +650,8 @@ static int gsm411_rx_rp_ack(struct msgb *msg, struct gsm_trans *trans,
sms_free(sms);
trans->sms.sms = NULL;
- /* do not free the transaction here, this is done by sending CP-ACK */
+ /* free the transaction here */
+ trans_free(trans);
/* check for more messages for this subscriber */
sms = db_sms_get_unsent_for_subscr(msg->lchan->subscr);