[folks] bluez: Don’t warn about the store being o ffline



commit f880acf39c0f396c992da70c1b6eb2b353882c1d
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Wed Nov 13 16:22:53 2013 +0000

    bluez: Don’t warn about the store being offline
    
    If the Bluetooth device is disconnected by the user between updates of
    the contact metadata, the code previously printed a warning when the
    next update attempt failed. Instead, just gracefully and silently fail
    and schedule the next update.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712274

 backends/bluez/bluez-persona-store.vala |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/backends/bluez/bluez-persona-store.vala b/backends/bluez/bluez-persona-store.vala
index e1be0ab..b6a0f6e 100644
--- a/backends/bluez/bluez-persona-store.vala
+++ b/backends/bluez/bluez-persona-store.vala
@@ -933,8 +933,17 @@ public class Folks.Backends.BlueZ.PersonaStore : Folks.PersonaStore
                   if (e4 is IOError.CANCELLED)
                       return;
 
-                  warning ("Error updating persona store from BlueZ: %s",
-                      e4.message);
+                  /* Don't warn about offline stores. */
+                  if (e4 is PersonaStoreError.STORE_OFFLINE)
+                    {
+                      debug ("Not updating persona store from BlueZ due to " +
+                          "store being offline: %s", e4.message);
+                    }
+                  else
+                    {
+                      warning ("Error updating persona store from BlueZ: %s",
+                          e4.message);
+                    }
                 }
             });
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]