From 9badac0f8c5517662395ab509dbdecae9b9a9af2 Mon Sep 17 00:00:00 2001 From: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com> Date: Mon, 7 Aug 2017 23:41:43 -0400 Subject: [PATCH] ringaccout: prevent activities on disabled account RingAccount::loadAccount() was called even on disabled account, but this function does many activities like buddy presence. This is not expected and not wanted. Disabling this effect by checking if the account is enabled. Change-Id: I911670163763faf41c6e5c4a4941e53c2e134847 --- src/ringdht/ringaccount.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ringdht/ringaccount.cpp b/src/ringdht/ringaccount.cpp index 68e282ae8d..6c179267bc 100644 --- a/src/ringdht/ringaccount.cpp +++ b/src/ringdht/ringaccount.cpp @@ -1502,6 +1502,9 @@ RingAccount::migrateAccount(const std::string& pwd, dht::crypto::Identity& devic void RingAccount::loadAccount(const std::string& archive_password, const std::string& archive_pin) { + if (not isEnabled()) + return; + if (registrationState_ == RegistrationState::INITIALIZING) return; -- GitLab