From b5950e23917fd9eb1b4859de5678eaaeda3a8db8 Mon Sep 17 00:00:00 2001 From: Jeevaka Badrappan Date: Thu, 17 Mar 2011 10:20:31 -0700 Subject: sms: limit the sms sending retry If sending of SMS fails, then oFono core will try to resend it after n * 5 seconds(n = retry count). Due to this, conformance test case 27.22.8 sequence 1.4 fails(refer 31.124 spec). Plan is to limit the failue codes for which the retry will be done. This patch allows the retry if the failure is only due to network timeout. For all the other failure cases, retry is not done. --- src/sms.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/sms.c b/src/sms.c index 01f54dd5..da810f81 100644 --- a/src/sms.c +++ b/src/sms.c @@ -47,6 +47,7 @@ #define SETTINGS_GROUP "Settings" #define TXQ_MAX_RETRIES 4 +#define NETWORK_TIMEOUT 332 static gboolean tx_next(gpointer user_data); @@ -630,6 +631,11 @@ static void tx_finished(const struct ofono_error *error, int mr, void *data) if (sms->registered == FALSE) return; + /* Retry done only for Network Timeout failure */ + if (error->type == OFONO_ERROR_TYPE_CMS && + error->error != NETWORK_TIMEOUT) + goto next_q; + if (!(entry->flags & OFONO_SMS_SUBMIT_FLAG_RETRY)) goto next_q; -- cgit v1.2.3