diff options
author | Thomas Haller <thaller@redhat.com> | 2017-11-02 16:39:42 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-11-08 12:35:10 +0100 |
commit | d8bb62c9098058ea43786f267562d3df356b1e90 (patch) | |
tree | b328796d2b776bd1ba6c67e0aeb58b7475b7cd20 /src | |
parent | d0f82352eadf7270b0f65b5b927921fa039fb530 (diff) | |
download | NetworkManager-d8bb62c9098058ea43786f267562d3df356b1e90.tar.gz |
policy: remove redundant check in device_autoconnect_changed()
schedule_activate_check() also checks for nm_device_autoconnect_allowed()
and aborts if there is nothing to do.
(cherry picked from commit 990af413ac56c784125fe50df64a374933396e3f)
Diffstat (limited to 'src')
-rw-r--r-- | src/nm-policy.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c index 6d6bba8cf8..f5c72a1dcd 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -1159,8 +1159,7 @@ activate_data_free (ActivateData *data) nm_device_remove_pending_action (data->device, NM_PENDING_ACTION_AUTOACTIVATE, TRUE); priv->pending_activation_checks = g_slist_remove (priv->pending_activation_checks, data); - if (data->autoactivate_id) - g_source_remove (data->autoactivate_id); + nm_clear_g_source (&data->autoactivate_id); g_object_unref (data->device); g_slice_free (ActivateData, data); @@ -1996,8 +1995,7 @@ device_autoconnect_changed (NMDevice *device, NMPolicyPrivate *priv = user_data; NMPolicy *self = _PRIV_TO_SELF (priv); - if (nm_device_autoconnect_allowed (device)) - schedule_activate_check (self, device); + schedule_activate_check (self, device); } static void |