From 93285054ae5ef290d879a753f88824b5027e9c8a Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 13 Feb 2014 14:25:30 -0500 Subject: [PATCH] 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. --- src/nm-policy.c | 9 ++++----- 1 file 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,