Commit b02353e9 authored by Jiří Klimeš's avatar Jiří Klimeš
Browse files

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
parent a0fc5098
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment