From a1325ebd7585e3cd596b78cfa5b0172b65dcdf02 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 15 Mar 2017 12:14:33 +0100 Subject: [PATCH] manager: don't schedule devices_inited_cb() a second time The devices_inited_cb() callback is really supposed to only run when there is nothing else left in the mainloop to dispatch. But as we already schedule the idle action with G_PRIORITY_LOW+10 priority, it is very unlikely that there is anything else ready to run (unless scheduled with an even lower priority, and then it wouldn't help either because devices_inited_cb() would win again). --- src/nm-manager.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/nm-manager.c b/src/nm-manager.c index 5b9b14489..b1c6c479b 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -152,7 +152,6 @@ typedef struct { bool startup:1; bool devices_inited:1; - bool devices_inited_ready:1; bool sleeping:1; bool net_enabled:1; @@ -4820,13 +4819,6 @@ devices_inited_cb (gpointer user_data) NMManager *self = user_data; NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); - if (!priv->devices_inited_ready) { - /* lets go through another idle invocation to give the system - * more time to settle. */ - priv->devices_inited_ready = TRUE; - return G_SOURCE_CONTINUE; - } - priv->devices_inited_id = 0; priv->devices_inited = TRUE; check_if_startup_complete (self);