[gnome-settings-daemon] rfkill: Check if we're connected to the session bus where we use it



commit c890dfa3d3443387221cd1b3544b2425a56a2cb3
Author: Rui Matos <tiagomatos gmail com>
Date:   Tue Nov 12 18:46:46 2013 +0100

    rfkill: Check if we're connected to the session bus where we use it
    
    There are other code paths that end up in engine_properties_changed(),
    so move the session bus connection checking here.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712168

 plugins/rfkill/gsd-rfkill-manager.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plugins/rfkill/gsd-rfkill-manager.c b/plugins/rfkill/gsd-rfkill-manager.c
index 95b4da5..aaacb9c 100644
--- a/plugins/rfkill/gsd-rfkill-manager.c
+++ b/plugins/rfkill/gsd-rfkill-manager.c
@@ -205,6 +205,10 @@ engine_properties_changed (GsdRfkillManager *manager)
         GVariantBuilder props_builder;
         GVariant *props_changed = NULL;
 
+        /* not yet connected to the session bus */
+        if (manager->priv->connection == NULL)
+                return;
+
         g_variant_builder_init (&props_builder, G_VARIANT_TYPE ("a{sv}"));
 
         g_variant_builder_add (&props_builder, "{sv}", "AirplaneMode",
@@ -271,10 +275,6 @@ rfkill_changed (CcRfkillGlib     *rfkill,
                 }
        }
 
-        /* not yet connected to the bus */
-        if (manager->priv->connection == NULL)
-                return;
-
         engine_properties_changed (manager);
 }
 


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