Commit ac39dddc authored by Adrien Béraud's avatar Adrien Béraud Committed by gerrit2

ringaccount: save device name after edit

After calling setAccountDetails with a new device name,
set the new device name in the device list
so the list is not overriten by loading the
device list from file.

Change-Id: Ie113e211fb7d0ace1c076122b1bc98ce6a49af08
Tuleap: #1494
parent 257bf30d
......@@ -1517,12 +1517,20 @@ RingAccount::setAccountDetails(const std::map<std::string, std::string>& details
parseString(details, DRing::Account::ConfProperties::RING_DEVICE_NAME, ringDeviceName_);
#if HAVE_RINGNS
//std::string ringns_server;
parseString(details, DRing::Account::ConfProperties::RingNS::URI, nameServer_);
nameDir_ = NameDirectory::instance(nameServer_);
#endif
loadAccount(archive_password, archive_pin);
// update device name if necessary
auto dev = knownDevices_.find(dht::InfoHash(ringDeviceId_));
if (dev != knownDevices_.end()) {
if (dev->second.name != ringDeviceName_) {
dev->second.name = ringDeviceName_;
saveKnownDevices();
}
}
}
std::map<std::string, std::string>
......
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