[gnome-calendar] source-dialog: better handle server errors
- From: Erick Pérez Castellanos <erickpc src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-calendar] source-dialog: better handle server errors
 
- Date: Mon, 25 May 2015 16:53:39 +0000 (UTC)
 
commit b55783a0efbbef07d8cb30c0f694e11b59221b8e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Mar 30 23:34:30 2015 -0300
    source-dialog: better handle server errors
 src/gcal-source-dialog.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index 00a34cb..6f7eee9 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -747,9 +747,12 @@ discover_sources_cb (GObject      *source,
 
       /*
        * If it's the first try and things went wrong,
-       * retry with the user credentials.
+       * retry with the user credentials. Also, it
+       * checks for the error code, since we don't
+       * really want to retry things on unavailable
+       * servers.
        */
-      if (!priv->prompt_password)
+      if (!priv->prompt_password && error->code == 14)
         {
           g_debug ("[source-dialog] No credentials failed, retrying with user credentials...");
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]