mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-22 22:00:08 +01:00
device: don't remove and re-add pending action in nm_device_bring_up()
This commit is contained in:
parent
3cb5d20c34
commit
dba5e8e731
1 changed files with 3 additions and 4 deletions
|
|
@ -6349,12 +6349,11 @@ nm_device_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware)
|
|||
* a timeout is reached.
|
||||
*/
|
||||
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);
|
||||
nm_device_remove_pending_action (self, "carrier wait", TRUE);
|
||||
}
|
||||
else
|
||||
nm_device_add_pending_action (self, "carrier wait", TRUE);
|
||||
priv->carrier_wait_id = g_timeout_add_seconds (5, carrier_wait_timeout, self);
|
||||
nm_device_add_pending_action (self, "carrier wait", TRUE);
|
||||
}
|
||||
|
||||
/* Can only get HW address of some devices when they are up */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue