diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-02-24 14:29:27 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-02-24 14:31:39 +0100 |
commit | 024dc77de23bdc31f9592d1768cdd285c0dbb7bf (patch) | |
tree | def2c7111433771fb916d9b73a716259f0925e66 /openbsc/src/libmsc/sms_queue.c | |
parent | 98258dbbc648f5fe02a62cf3d47b388376125926 (diff) |
sms: Do not interfere with the SMS queue from within gsm_04_11
It was possible that two SMS would be delivered at the same time
which violates GSM 04.11. We should solely rely on the sms queue
to schedule more SMS to the subscriber.
Diffstat (limited to 'openbsc/src/libmsc/sms_queue.c')
-rw-r--r-- | openbsc/src/libmsc/sms_queue.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openbsc/src/libmsc/sms_queue.c b/openbsc/src/libmsc/sms_queue.c index c8745c3da..b7753270a 100644 --- a/openbsc/src/libmsc/sms_queue.c +++ b/openbsc/src/libmsc/sms_queue.c @@ -380,6 +380,7 @@ static int sms_sms_cb(unsigned int subsys, unsigned int signal, /* We got a new SMS and maybe should launch the queue again. */ if (signal == S_SMS_SUBMITTED || signal == S_SMS_SMMA) { + /* TODO: For SMMA we might want to re-use the radio connection. */ sms_queue_trigger(network->sms_queue); return 0; } @@ -399,15 +400,14 @@ static int sms_sms_cb(unsigned int subsys, unsigned int signal, switch (signal) { case S_SMS_DELIVERED: + network->sms_queue->pending -= 1; + sms_pending_free(pending); /* - * Create place for a new SMS but keep the pending data - * so we will not attempt to send the SMS for this subscriber - * as we still have an open channel and will attempt to submit - * SMS to it anyway. + * TODO: we could specially make sure to re-use the existing + * radio connection here. Maybe something like the readyForSM + * code. */ - network->sms_queue->pending -= 1; sms_submit_pending(network->sms_queue); - sms_pending_free(pending); break; case S_SMS_MEM_EXCEEDED: network->sms_queue->pending -= 1; |