mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
device: add pending-action "recheck-available"
Startup-complete means that all devices have settled in a state and no further activation is pending. When we have a recheck-available scheduled, we clearly should not yet declare startup-complete. Add a new pending-action "recheck-available" to avoid: <info> [1485520408.3920] device (wlp2s0): supplicant interface state: starting -> ready <debug> [1485520408.3920] device[0x563abbcca400] (wlp2s0): remove_pending_action (0): 'waiting for supplicant' <info> [1485520408.3920] manager: startup complete <debug> [1485520408.3924] device[0x563abbcca400] (wlp2s0): add_pending_action (1): 'queued state change to disconnected'
This commit is contained in:
parent
95a95b3e48
commit
11744b090e
|
@ -143,6 +143,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMDevice,
|
||||||
#define PENDING_ACTION_DHCP4 "dhcp4"
|
#define PENDING_ACTION_DHCP4 "dhcp4"
|
||||||
#define PENDING_ACTION_DHCP6 "dhcp6"
|
#define PENDING_ACTION_DHCP6 "dhcp6"
|
||||||
#define PENDING_ACTION_AUTOCONF6 "autoconf6"
|
#define PENDING_ACTION_AUTOCONF6 "autoconf6"
|
||||||
|
#define PENDING_ACTION_RECHECK_AVAILABLE "recheck-available"
|
||||||
|
|
||||||
#define DHCP_RESTART_TIMEOUT 120
|
#define DHCP_RESTART_TIMEOUT 120
|
||||||
#define DHCP_NUM_TRIES_MAX 3
|
#define DHCP_NUM_TRIES_MAX 3
|
||||||
|
@ -3921,6 +3922,9 @@ recheck_available (gpointer user_data)
|
||||||
priv->recheck_available.unavailable_reason = NM_DEVICE_STATE_REASON_NONE;
|
priv->recheck_available.unavailable_reason = NM_DEVICE_STATE_REASON_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (priv->recheck_available.call_id == 0)
|
||||||
|
nm_device_remove_pending_action (self, PENDING_ACTION_RECHECK_AVAILABLE, TRUE);
|
||||||
|
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3933,8 +3937,12 @@ nm_device_queue_recheck_available (NMDevice *self,
|
||||||
|
|
||||||
priv->recheck_available.available_reason = available_reason;
|
priv->recheck_available.available_reason = available_reason;
|
||||||
priv->recheck_available.unavailable_reason = unavailable_reason;
|
priv->recheck_available.unavailable_reason = unavailable_reason;
|
||||||
if (!priv->recheck_available.call_id)
|
if (!priv->recheck_available.call_id) {
|
||||||
priv->recheck_available.call_id = g_idle_add (recheck_available, self);
|
priv->recheck_available.call_id = g_idle_add (recheck_available, self);
|
||||||
|
nm_device_add_pending_action (self, PENDING_ACTION_RECHECK_AVAILABLE,
|
||||||
|
FALSE /* cannot assert, because of how recheck_available() first clears
|
||||||
|
the call-id and postpones removing the pending-action. */);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue