From 9372355074e361c035e97007a1937f7af2545383 Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandresavard@alexandresavard-desktop.(none)> Date: Wed, 2 Dec 2009 18:09:01 -0500 Subject: [PATCH] [#2486] Set localAddress to ANY only at startup --- sflphone-common/src/managerimpl.cpp | 5 ++++- sflphone-common/src/sip/sipaccount.cpp | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index a2a2f17f74..c97310af27 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -1545,8 +1545,11 @@ ManagerImpl::initRegisterAccounts() while (iter != _accountMap.end()) { if (iter->second) { iter->second->loadConfig(); - /* If the account is set as enabled, try to register */ + // TODO: take off this protection by storing localIPAddress using interface name + setConfig(iter->second->getAccountID(), LOCAL_ADDRESS, "0.0.0.0"); + + /* If the account is set as enabled, try to register */ if (iter->second->isEnabled()) { status = iter->second->registerVoIPLink(); diff --git a/sflphone-common/src/sip/sipaccount.cpp b/sflphone-common/src/sip/sipaccount.cpp index ac9428f0ca..52f7c3a0df 100644 --- a/sflphone-common/src/sip/sipaccount.cpp +++ b/sflphone-common/src/sip/sipaccount.cpp @@ -338,8 +338,8 @@ void SIPAccount::loadConfig() // Do not store or use IP address in config as this address may change // Use loadSIPLocalIP for now instead in register/unregister (UDP,STUN,TLS), newOutGoingCall, mod_on_rx_request // TODO: if we realy have to bind to a specific interface, store interfaces by name instead - setLocalAddress (std::string("0.0.0.0")); - // setLocalAddress (Manager::instance().getConfigString (_accountID, LOCAL_ADDRESS)); + // setLocalAddress (std::string("0.0.0.0")); + setLocalAddress (Manager::instance().getConfigString (_accountID, LOCAL_ADDRESS)); // Published parameters -- GitLab