mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 01:20:12 +01:00
core: fix a regression in manual device disconnection (bgo #726239)
Devices disconnected explicitly by user should stay disconnected, preventing auto-connecting until manual request. Introduction of NM_DEVICE_STATE_DEACTIVATING state broke this feature. disconnect_cb() correctly set autoconnect device property to FALSE, however nm_device_state_changed() put it to TRUE again. Thus only the active connection was blocked instead of the whole device. https://bugzilla.gnome.org/show_bug.cgi?id=726239
This commit is contained in:
parent
a0fc5098b3
commit
b02353e954
1 changed files with 5 additions and 1 deletions
|
|
@ -6545,10 +6545,14 @@ nm_device_state_changed (NMDevice *device,
|
|||
nm_device_deactivate (device, reason);
|
||||
break;
|
||||
default:
|
||||
priv->autoconnect = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Reset autoconnect flag when the device is activating or connected. */
|
||||
if ( state >= NM_DEVICE_STATE_PREPARE
|
||||
&& state <= NM_DEVICE_STATE_ACTIVATED)
|
||||
priv->autoconnect = TRUE;
|
||||
|
||||
g_object_notify (G_OBJECT (device), NM_DEVICE_STATE);
|
||||
g_object_notify (G_OBJECT (device), NM_DEVICE_STATE_REASON);
|
||||
g_signal_emit_by_name (device, "state-changed", state, old_state, reason);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue