Skip to content
Snippets Groups Projects
Commit e57b7519 authored by Yun Liu's avatar Yun Liu
Browse files

Fix bug for ticket #92

parent 4be331e3
No related branches found
No related tags found
No related merge requests found
...@@ -2117,16 +2117,19 @@ ManagerImpl::addAccount(const std::map< ::DBus::String, ::DBus::String >& detail ...@@ -2117,16 +2117,19 @@ ManagerImpl::addAccount(const std::map< ::DBus::String, ::DBus::String >& detail
if(!_userAgentInitlized) { if(!_userAgentInitlized) {
// Initialize the SIP Manager // Initialize the SIP Manager
_userAgent = new UserAgent(); _userAgent = new UserAgent();
_userAgentInitlized = true;
} }
newAccount = AccountCreator::createAccount(AccountCreator::SIP_ACCOUNT, newAccountID); newAccount = AccountCreator::createAccount(AccountCreator::SIP_ACCOUNT, newAccountID);
// Determine whether to use stun for the current account or not // Determine whether to use stun for the current account or not
int useStun = Manager::instance().getConfigInt(newAccount->getAccountID(),SIP_USE_STUN); if((*details.find(SIP_USE_STUN)).second == "TRUE") {
_userAgent->setStunServer((*details.find(SIP_STUN_SERVER)).second.data());
}
if(useStun == 1) { if(!_userAgentInitlized) {
_userAgent->setStunServer(Manager::instance().getConfigString(newAccount->getAccountID(), SIP_STUN_SERVER).data()); _userAgentInitlized = true;
_userAgent->sipCreate();
_userAgent->sipInit();
} }
} }
else if (accountType == "IAX") { else if (accountType == "IAX") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment