diff options
author | Dan Winship <danw@gnome.org> | 2014-02-13 14:25:30 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-02-17 14:57:15 -0500 |
commit | 93285054ae5ef290d879a753f88824b5027e9c8a (patch) | |
tree | 393bd345cab1e3303798dbeeca0813210d882505 | |
parent | a217a742f1207e4451f401280048f64e10cfd5be (diff) | |
download | NetworkManager-93285054ae5ef290d879a753f88824b5027e9c8a.tar.gz |
Revert "core: fix warning about pending action "autoactivate""
This change removed the "autoactivate" pending action too soon,
creating a window where the device had no pending actions, allowing
the manager to declare startup complete while devices were still being
activated.
This reverts commit a16b7a82538e59af19557e03ae54e2e6afb5a891.
-rw-r--r-- | src/nm-policy.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c index 71f53e6afe..142cf6521a 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -937,10 +937,10 @@ typedef struct { static void activate_data_free (ActivateData *data) { - if (data->autoactivate_id) { - nm_device_remove_pending_action (data->device, "autoactivate"); + nm_device_remove_pending_action (data->device, "autoactivate"); + + if (data->autoactivate_id) g_source_remove (data->autoactivate_id); - } g_object_unref (data->device); memset (data, 0, sizeof (*data)); g_free (data); @@ -960,9 +960,8 @@ auto_activate_device (gpointer user_data) policy = data->policy; priv = NM_POLICY_GET_PRIVATE (policy); - priv->pending_activation_checks = g_slist_remove (priv->pending_activation_checks, data); data->autoactivate_id = 0; - nm_device_remove_pending_action (data->device, "autoactivate"); + priv->pending_activation_checks = g_slist_remove (priv->pending_activation_checks, data); // FIXME: if a device is already activating (or activated) with a connection // but another connection now overrides the current one for that device, |