From 34e0564a25482e262dc27848031a94ca820e733e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= <rafael.carre@savoirfairelinux.com> Date: Fri, 29 Jul 2011 10:43:36 -0400 Subject: [PATCH] * #6558 : Account::loadConfig() : move IAX code to IAXAccount --- sflphone-common/src/account.cpp | 12 ------------ sflphone-common/src/account.h | 2 +- sflphone-common/src/iax/iaxaccount.cpp | 6 ++++-- sflphone-common/src/sip/sipaccount.cpp | 3 --- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/sflphone-common/src/account.cpp b/sflphone-common/src/account.cpp index a06c8c7617..283164a61d 100644 --- a/sflphone-common/src/account.cpp +++ b/sflphone-common/src/account.cpp @@ -54,18 +54,6 @@ Account::~Account() { } -void Account::loadConfig() -{ - - // If IAX is not supported, do not register this account -#ifndef USE_IAX - - if (_type == "IAX") - _enabled = false; - -#endif -} - void Account::setRegistrationState (RegistrationState state) { if (state != _registrationState) { diff --git a/sflphone-common/src/account.h b/sflphone-common/src/account.h index a263128e37..46f63a5687 100644 --- a/sflphone-common/src/account.h +++ b/sflphone-common/src/account.h @@ -177,7 +177,7 @@ class Account : public Serializable /** * Load the settings for this account. */ - virtual void loadConfig(); + virtual void loadConfig() = 0; /** * Get the account ID diff --git a/sflphone-common/src/iax/iaxaccount.cpp b/sflphone-common/src/iax/iaxaccount.cpp index a1e8ac5530..3e2907d33a 100644 --- a/sflphone-common/src/iax/iaxaccount.cpp +++ b/sflphone-common/src/iax/iaxaccount.cpp @@ -201,6 +201,8 @@ IAXAccount::unregisterVoIPLink() void IAXAccount::loadConfig() { - // Account generic - Account::loadConfig(); + // If IAX is not supported, do not register this account +#ifndef USE_IAX + _enabled = false; +#endif } diff --git a/sflphone-common/src/sip/sipaccount.cpp b/sflphone-common/src/sip/sipaccount.cpp index d0bce5bb15..54751c53b8 100644 --- a/sflphone-common/src/sip/sipaccount.cpp +++ b/sflphone-common/src/sip/sipaccount.cpp @@ -751,9 +751,6 @@ void SIPAccount::loadConfig() } else { _transportType = PJSIP_TRANSPORT_UDP; } - - // Account generic - Account::loadConfig(); } bool SIPAccount::fullMatch (const std::string& username, const std::string& hostname) const -- GitLab