aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem-time.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-03-05 16:10:53 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-16 14:53:20 +0100
commit10669881a5520c253ab8ba6f05de4ff5afdc7a31 (patch)
treef0a8d883b4f280d752fe6ce1ad394b3910dcf8da /src/mm-iface-modem-time.c
parent120ac6da39ef1d3abb57f77f1e77de10bf58f194 (diff)
iface-modem-time: only retry if MM_CORE_ERROR_RETRY was returned
We don't want to retry if the error is fatal in some other kind, e.g. a reply parsing error or something.
Diffstat (limited to 'src/mm-iface-modem-time.c')
-rw-r--r--src/mm-iface-modem-time.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mm-iface-modem-time.c b/src/mm-iface-modem-time.c
index a7763fff..2e200f59 100644
--- a/src/mm-iface-modem-time.c
+++ b/src/mm-iface-modem-time.c
@@ -137,8 +137,11 @@ load_network_timezone_ready (MMIfaceModemTime *self,
/* Retry? */
ctx->network_timezone_poll_retries--;
- /* Fatal if no more retries */
- if (ctx->network_timezone_poll_retries == 0) {
+ /* Fatal if no more retries, or if specific error is not RETRY */
+ if (ctx->network_timezone_poll_retries == 0 ||
+ !g_error_matches (error,
+ MM_CORE_ERROR,
+ MM_CORE_ERROR_RETRY)) {
g_simple_async_result_take_error (ctx->result, error);
update_network_timezone_context_complete_and_free (ctx);
return;