From 174c963f2485aabc6ad3e6e6358e8974ba636c54 Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandre.savard@savoirfairelinux.com> Date: Fri, 9 Jul 2010 11:26:49 -0400 Subject: [PATCH] [#3649] Fix account registration protection in case IAX not supported --- sflphone-common/src/account.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sflphone-common/src/account.cpp b/sflphone-common/src/account.cpp index 40da977a20..6480b65d41 100644 --- a/sflphone-common/src/account.cpp +++ b/sflphone-common/src/account.cpp @@ -49,21 +49,13 @@ Account::~Account() void Account::loadConfig() { - std::string p; - - p = Manager::instance().getConfigString (_accountID , CONFIG_ACCOUNT_TYPE); -#ifdef USE_IAX - _enabled = (Manager::instance().getConfigString (_accountID, CONFIG_ACCOUNT_ENABLE) == "true") ? true : false; -#else - - if (p == "IAX") - _enabled = false; - else - _enabled = (Manager::instance().getConfigString (_accountID, CONFIG_ACCOUNT_ENABLE) == "true") ? true : false; - + // If IAX is not supported, do not register this account +#ifndef USE_IAX + if (_type == "IAX") + _enabled = false; #endif - loadAudioCodecs (); + loadAudioCodecs (); } void Account::setRegistrationState (RegistrationState state) { -- GitLab