Commit 8fc5d854 authored by Lamarque Souza's avatar Lamarque Souza
Browse files

Since NM guys are being too slow to fix this bug I am adding this hack until

they fix it for good. Please try and see if it does not bring new bugs.

CCBUG: 276486
parent f6cc7df6
......@@ -338,18 +338,22 @@ void NMDBusSettingsConnectionProvider::updateConnection(const QString &uuid, Knm
ConnectionDbus converter(newConnection);
QVariantMapMap map = converter.toDbusMap();
* Until NM guys fix the bug described in fix let's use the hack
* in the "else" clause below to force NM to update secrets.
if (newConnection->name() == remote->id()) {
} else {
} else*/ {
/* If connection's name (id in NM's termonology) changes during an Update
* NM will leave the old connection file intact and create a new connection file
* in /etc/NetworkManager/system-connections/ with the same uuid, which is wrong in my oppinion.
* Furthermore the old connection will not be shown in connection list because we use the uuid
* as connection identifier.
* Furthermore the old connection will not be shown in Plasma NM's connection list
* because we use connection's uuid as connection identifier.
* Deleting the old connection and creating a new one seems to work.
QDBusPendingCall reply = remote->Delete();
......@@ -400,7 +404,6 @@ void NMDBusSettingsConnectionProvider::onConnectionAddArrived(QDBusPendingCallWa
QDBusObjectPath objPath = reply.argumentAt<0>();
emit addConnectionCompleted(true, QString());
// Hack to force NetworkManager to call the secrets agent to save this connections's secrets.
// This does not work for VPN connections.
......@@ -408,9 +411,11 @@ void NMDBusSettingsConnectionProvider::onConnectionAddArrived(QDBusPendingCallWa
QString uuid = d->uuidToPath.key(objPath.path(), QUuid()).toString();
RemoteConnection *remote = d->connections.value(uuid);
QVariantMapMap map = d->secretsToSave.take(uuid);
kDebug() << "Connection added successfully: " << objPath.path() << uuid;
emit addConnectionCompleted(true, QString());
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