diff options
author | Thomas Haller <thaller@redhat.com> | 2014-04-28 11:18:05 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-05-01 22:06:52 +0200 |
commit | a16faa3985042dadb34600cb0df2eefc61360340 (patch) | |
tree | af699acf0c3aff6ac79d664565d19d32b72cc3d9 /src/nm-active-connection.c | |
parent | 50bafeaf2e318f63dd24053440712dee3035fa84 (diff) | |
download | NetworkManager-a16faa3985042dadb34600cb0df2eefc61360340.tar.gz |
core: add parameter to ignore error in add/remove pending action
Add a parameter to nm_device_add_pending_action() to silently
accept adding duplicate actions.
Same for nm_device_remove_pending_action(), to silently ignore
removing non-pending actions.
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'src/nm-active-connection.c')
-rw-r--r-- | src/nm-active-connection.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index 43f81893e3..172aa61419 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -152,7 +152,7 @@ nm_active_connection_set_state (NMActiveConnection *self, && new_state >= NM_ACTIVE_CONNECTION_STATE_ACTIVATED && priv->pending_activation_id) { - nm_device_remove_pending_action (priv->device, priv->pending_activation_id); + nm_device_remove_pending_action (priv->device, priv->pending_activation_id, TRUE); g_clear_pointer (&priv->pending_activation_id, g_free); } } @@ -399,7 +399,7 @@ nm_active_connection_set_device (NMActiveConnection *self, NMDevice *device) if (!priv->assumed) { priv->pending_activation_id = g_strdup_printf ("activation::%p", (void *)self); - nm_device_add_pending_action (device, priv->pending_activation_id); + nm_device_add_pending_action (device, priv->pending_activation_id, TRUE); } } return TRUE; @@ -540,7 +540,7 @@ nm_active_connection_set_assumed (NMActiveConnection *self, gboolean assumed) priv->assumed = assumed; if (priv->pending_activation_id) { - nm_device_remove_pending_action (priv->device, priv->pending_activation_id); + nm_device_remove_pending_action (priv->device, priv->pending_activation_id, TRUE); g_clear_pointer (&priv->pending_activation_id, g_free); } } @@ -795,7 +795,7 @@ _device_cleanup (NMActiveConnection *self) } if (priv->pending_activation_id) { - nm_device_remove_pending_action (priv->device, priv->pending_activation_id); + nm_device_remove_pending_action (priv->device, priv->pending_activation_id, TRUE); g_clear_pointer (&priv->pending_activation_id, g_free); } |