summaryrefslogtreecommitdiffstats
path: root/src/sms.c
diff options
context:
space:
mode:
authorJeevaka Badrappan <jeevaka.badrappan@elektrobit.com>2011-03-17 10:20:31 -0700
committerDenis Kenzior <denkenz@gmail.com>2011-03-17 12:23:35 -0500
commitb5950e23917fd9eb1b4859de5678eaaeda3a8db8 (patch)
tree6aada87fcef6e5c3079cc425c35e75e264847db3 /src/sms.c
parent7de1717d4296266c3ea980613698acf9a70563fc (diff)
downloadofono-b5950e23917fd9eb1b4859de5678eaaeda3a8db8.tar.bz2
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.
Diffstat (limited to 'src/sms.c')
-rw-r--r--src/sms.c6
1 files changed, 6 insertions, 0 deletions
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;