aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_04_11.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-12-22 13:45:58 +0100
committerHarald Welte <laforge@gnumonks.org>2009-12-22 13:45:58 +0100
commit4983921af1a84ea20c6be7944bf0ff4928578a69 (patch)
treeaac5f3ffe6bf6f9507c97b51fb8ea4750a4a564c /openbsc/src/gsm_04_11.c
parent4010f1e6f4d3f1c702be836a2342aefd8de73f2a (diff)
[gsm_04_11] Replace hardcoded transaction_id by real allocation
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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbsc/src/gsm_04_11.c b/openbsc/src/gsm_04_11.c
index 579bb55d..a5f64f17 100644
--- a/openbsc/src/gsm_04_11.c
+++ b/openbsc/src/gsm_04_11.c
@@ -1011,7 +1011,11 @@ int gsm411_send_sms_lchan(struct gsm_lchan *lchan, struct gsm_sms *sms)
u_int8_t transaction_id;
int rc;
- transaction_id = 4; /* FIXME: we always use 4 for now */
+ transaction_id = trans_assign_trans_id(lchan->subscr, GSM48_PDISC_SMS, 0);
+ if (transaction_id == -1) {
+ DEBUGP(DSMS, "No available transaction ids\n");
+ return -EBUSY;
+ }
msg->lchan = lchan;