Commit d4619707 authored by Lamarque Souza's avatar Lamarque Souza
Browse files

Backport fix for disconnecting auto-connect connections to master branch

(NM-0.8).

BUG: 274846
parent 8458aace
......@@ -267,10 +267,14 @@ void NMDBusSettingsService::interfaceConnectionDeactivated()
Solid::Control::NetworkInterface *iface = Solid::Control::NetworkManager::findNetworkInterface(ic->deviceUni());
if (iface) {
iface->disconnectInterface();
} else {
} else { // VPN connections do have NetworkInterface objects.
Solid::Control::NetworkManager::deactivateConnection(ic->property("NMDBusActiveConnectionObject").toString());
}
#else
QDBusInterface devIface(QLatin1String(NM_DBUS_SERVICE), ic->deviceUni(), "org.freedesktop.NetworkManager.Device", QDBusConnection::systemBus());
devIface.call("Disconnect");
// The command above does not work for VPN connections, this one does.
Solid::Control::NetworkManager::deactivateConnection(ic->property("NMDBusActiveConnectionObject").toString());
#endif
}
......
Supports Markdown
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