mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 01:20:07 +01:00
wifi: allow supplicant disconnect request more often
Use a broader range of supplicant interface states to determine when to tell the supplicant to idle; we want to allow the disconnect in all of these states, not just some of them. Second, allow the active network to be removed from the supplicant's list in most of these states, even when the supplicant interface is inactive or disconnected.
This commit is contained in:
parent
fdfbe00aac
commit
a27cd8e5d9
1 changed files with 7 additions and 11 deletions
|
|
@ -682,12 +682,13 @@ nm_supplicant_interface_disconnect (NMSupplicantInterface * self)
|
|||
if (!priv->iface_proxy)
|
||||
return;
|
||||
|
||||
/* Don't try to disconnect if the supplicant interface is already disconnected */
|
||||
if ( priv->state == NM_SUPPLICANT_INTERFACE_STATE_DISCONNECTED
|
||||
|| priv->state == NM_SUPPLICANT_INTERFACE_STATE_INACTIVE) {
|
||||
g_free (priv->net_path);
|
||||
priv->net_path = NULL;
|
||||
return;
|
||||
/* Disconnect from the current AP */
|
||||
if ( (priv->state >= NM_SUPPLICANT_INTERFACE_STATE_SCANNING)
|
||||
&& (priv->state <= NM_SUPPLICANT_INTERFACE_STATE_COMPLETED)) {
|
||||
dbus_g_proxy_begin_call (priv->iface_proxy, "Disconnect",
|
||||
disconnect_cb,
|
||||
NULL, NULL,
|
||||
G_TYPE_INVALID);
|
||||
}
|
||||
|
||||
/* Remove any network that was added by NetworkManager */
|
||||
|
|
@ -700,11 +701,6 @@ nm_supplicant_interface_disconnect (NMSupplicantInterface * self)
|
|||
g_free (priv->net_path);
|
||||
priv->net_path = NULL;
|
||||
}
|
||||
|
||||
dbus_g_proxy_begin_call (priv->iface_proxy, "Disconnect",
|
||||
disconnect_cb,
|
||||
NULL, NULL,
|
||||
G_TYPE_INVALID);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue