Skip to content
Snippets Groups Projects
Commit 303c50f2 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#3946] Fix credential count in configuration manager

parent 8e965897
No related branches found
No related tags found
No related merge requests found
...@@ -292,14 +292,16 @@ std::map<std::string, std::string> ConfigurationManager::getCredential( ...@@ -292,14 +292,16 @@ std::map<std::string, std::string> ConfigurationManager::getCredential(
int32_t ConfigurationManager::getNumberOfCredential( int32_t ConfigurationManager::getNumberOfCredential(
const std::string& accountID) { const std::string& accountID) {
return Manager::instance().getConfigInt(accountID, CONFIG_CREDENTIAL_NUMBER);
SIPAccount *sipaccount = (SIPAccount *)Manager::instance().getAccount(accountID);
return sipaccount->getCredentialCount();
} }
void ConfigurationManager::setNumberOfCredential(const std::string& accountID, void ConfigurationManager::setNumberOfCredential(const std::string& accountID,
const int32_t& number) { const int32_t& number) {
if (accountID != AccountNULL || !accountID.empty()) { if (accountID != AccountNULL || !accountID.empty()) {
Manager::instance().setConfig(accountID, CONFIG_CREDENTIAL_NUMBER, SIPAccount *sipaccount = (SIPAccount *)Manager::instance().getAccount(accountID);
number); sipaccount->setCredentialCount(number);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment