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

[#4068] Return 0 on getNumberOfCredential dbus call for IAX (credentials are sip)

parent 07b26dd8
Branches
Tags
No related merge requests found
...@@ -332,8 +332,16 @@ int32_t ConfigurationManager::getNumberOfCredential ( ...@@ -332,8 +332,16 @@ int32_t ConfigurationManager::getNumberOfCredential (
const std::string& accountID) const std::string& accountID)
{ {
SIPAccount *sipaccount = (SIPAccount *) Manager::instance().getAccount (accountID); Account *account = Manager::instance().getAccount (accountID);
return sipaccount->getCredentialCount();
if (!account)
return 0;
if (account->getType() == "SIP") {
SIPAccount *sipaccount = static_cast<SIPAccount *> (account);
return sipaccount->getCredentialCount();
} else
return 0;
} }
void ConfigurationManager::setCredential (const std::string& accountID, void ConfigurationManager::setCredential (const std::string& accountID,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment