mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-02 20:10:28 +01: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'
(cherry picked from commit 11744b090e)
This commit is contained in:
parent
e3dc1a0cc5
commit
45ac6d8c12
1 changed files with 9 additions and 1 deletions
|
|
@ -143,6 +143,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMDevice,
|
|||
#define PENDING_ACTION_DHCP4 "dhcp4"
|
||||
#define PENDING_ACTION_DHCP6 "dhcp6"
|
||||
#define PENDING_ACTION_AUTOCONF6 "autoconf6"
|
||||
#define PENDING_ACTION_RECHECK_AVAILABLE "recheck-available"
|
||||
|
||||
#define DHCP_RESTART_TIMEOUT 120
|
||||
#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;
|
||||
}
|
||||
|
||||
if (priv->recheck_available.call_id == 0)
|
||||
nm_device_remove_pending_action (self, PENDING_ACTION_RECHECK_AVAILABLE, TRUE);
|
||||
|
||||
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.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);
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue