device: don't remove and re-add pending action in nm_device_bring_up()

This commit is contained in:
Thomas Haller
2014-12-06 14:59:25 +01:00
parent 3cb5d20c34
commit dba5e8e731

View File

@@ -6349,12 +6349,11 @@ nm_device_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware)
* a timeout is reached. * a timeout is reached.
*/ */
if (device_has_capability (self, NM_DEVICE_CAP_CARRIER_DETECT)) { if (device_has_capability (self, NM_DEVICE_CAP_CARRIER_DETECT)) {
if (priv->carrier_wait_id) { if (priv->carrier_wait_id)
g_source_remove (priv->carrier_wait_id); g_source_remove (priv->carrier_wait_id);
nm_device_remove_pending_action (self, "carrier wait", TRUE); else
}
priv->carrier_wait_id = g_timeout_add_seconds (5, carrier_wait_timeout, self);
nm_device_add_pending_action (self, "carrier wait", TRUE); nm_device_add_pending_action (self, "carrier wait", TRUE);
priv->carrier_wait_id = g_timeout_add_seconds (5, carrier_wait_timeout, self);
} }
/* Can only get HW address of some devices when they are up */ /* Can only get HW address of some devices when they are up */