[network-manager-applet/bg/mm-device-race-bgo776384: 1/4] reproducer (don't commit this)



commit d2d9aa2d101607b8979fe073e790611fb257821b
Author: Beniamino Galvani <bgalvani redhat com>
Date:   Thu Dec 29 23:59:38 2016 +0100

    reproducer (don't commit this)
    
    Delay the ModemManager initialization to trigger the issue.

 src/applet.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index f3a4a1e..5b013d1 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -2396,7 +2396,7 @@ mm_new_ready (GDBusConnection *connection,
        }
 }
 
-static void
+static gboolean
 mm1_client_setup (NMApplet *applet)
 {
        GDBusConnection *system_bus;
@@ -2414,6 +2414,8 @@ mm1_client_setup (NMApplet *applet)
                g_warning ("Error connecting to system D-Bus: %s", error->message);
                g_clear_error (&error);
        }
+
+       return FALSE;
 }
 
 #endif /* WITH_WWAN */
@@ -3260,7 +3262,7 @@ applet_startup (GApplication *app, gpointer user_data)
        g_assert (applet->bt_class);
 
 #if WITH_WWAN
-       mm1_client_setup (applet);
+       g_idle_add ((GSourceFunc) mm1_client_setup, applet);
 #endif
 
        if (applet->status_icon) {


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