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).
This commit is contained in:
@@ -152,7 +152,6 @@ typedef struct {
|
|||||||
|
|
||||||
bool startup:1;
|
bool startup:1;
|
||||||
bool devices_inited:1;
|
bool devices_inited:1;
|
||||||
bool devices_inited_ready:1;
|
|
||||||
|
|
||||||
bool sleeping:1;
|
bool sleeping:1;
|
||||||
bool net_enabled:1;
|
bool net_enabled:1;
|
||||||
@@ -4820,13 +4819,6 @@ devices_inited_cb (gpointer user_data)
|
|||||||
NMManager *self = user_data;
|
NMManager *self = user_data;
|
||||||
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
|
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_id = 0;
|
||||||
priv->devices_inited = TRUE;
|
priv->devices_inited = TRUE;
|
||||||
check_if_startup_complete (self);
|
check_if_startup_complete (self);
|
||||||
|
Reference in New Issue
Block a user