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
This commit is contained in:
Guillaume Roguez
2017-08-07 23:41:43 -04:00
committed by Adrien Béraud
parent fc714d1fbe
commit 9badac0f8c

View File

@ -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;