From 024dc77de23bdc31f9592d1768cdd285c0dbb7bf Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 24 Feb 2014 14:29:27 +0100 Subject: 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. --- openbsc/src/libmsc/sms_queue.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'openbsc/src/libmsc/sms_queue.c') 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; -- cgit v1.2.3