diff --git a/sflphone-gtk/src/accountwindow.c b/sflphone-gtk/src/accountwindow.c index 6bc5e56a80a41a6117322420082df797ba23d17f..a6d54647e969fa7f7b489561300bb8e416bad261 100644 --- a/sflphone-gtk/src/accountwindow.c +++ b/sflphone-gtk/src/accountwindow.c @@ -258,10 +258,6 @@ show_account_window (account_t * a) { gchar* proto = (gchar *)gtk_combo_box_get_active_text(GTK_COMBO_BOX(entryProtocol)); - g_hash_table_replace(currentAccount->properties, - g_strdup("AccountID"), - g_strdup(curAccountID)); - g_hash_table_replace(currentAccount->properties, g_strdup(ACCOUNT_ENABLED), g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(entryEnabled)) ? "TRUE": "FALSE")); diff --git a/src/dbus/configurationmanager.cpp b/src/dbus/configurationmanager.cpp index f5c15d02067c877dc39f907273c0df5f1d005ee7..0e9a09e6751623531c7c6dfa8dc1918260bb20dd 100644 --- a/src/dbus/configurationmanager.cpp +++ b/src/dbus/configurationmanager.cpp @@ -19,6 +19,7 @@ #include <global.h> #include <configurationmanager.h> +#include <sstream> #include "../manager.h" const char* ConfigurationManager::SERVER_PATH = "/org/sflphone/SFLphone/ConfigurationManager"; @@ -49,8 +50,9 @@ void ConfigurationManager::addAccount( const std::map< ::DBus::String, ::DBus::String >& details ) { _debug("ConfigurationManager::addAccount received\n"); - std::string accountID = (*details.find("AccountID")).second; - Manager::instance().setAccountDetails(accountID, details); + std::stringstream accountID; + accountID << "Account:" << time(NULL); + Manager::instance().setAccountDetails(accountID.str(), details); } diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index accf2c0b73743fd5fe1503c347bc5cc6f024fe39..ffea1bc3130c680202dd113f7693a937b15c0543 100644 --- a/src/managerimpl.cpp +++ b/src/managerimpl.cpp @@ -1698,10 +1698,10 @@ ManagerImpl::setAccountDetails( const ::DBus::String& accountID, setConfig(accountID, SIP_AUTH_NAME, (*details.find(SIP_AUTH_NAME)).second); setConfig(accountID, SIP_PASSWORD, (*details.find(SIP_PASSWORD)).second); setConfig(accountID, SIP_HOST_PART, (*details.find(SIP_HOST_PART)).second); - setConfig(accountID, SIP_PROXY, (*details.find(SIP_PROXY)).second); - setConfig(accountID, SIP_STUN_SERVER,(*details.find(SIP_STUN_SERVER)).second); - setConfig(accountID, SIP_USE_STUN, - (*details.find(SIP_USE_STUN)).second == "TRUE" ? "1" : "0"); + //setConfig(accountID, SIP_PROXY, (*details.find(SIP_PROXY)).second); + //setConfig(accountID, SIP_STUN_SERVER,(*details.find(SIP_STUN_SERVER)).second); + //setConfig(accountID, SIP_USE_STUN, + // (*details.find(SIP_USE_STUN)).second == "TRUE" ? "1" : "0"); } else if (accountType == "IAX") { setConfig(accountID, IAX_FULL_NAME, (*details.find(IAX_FULL_NAME)).second); @@ -1715,7 +1715,7 @@ ManagerImpl::setAccountDetails( const ::DBus::String& accountID, saveConfig(); unloadAccountMap(); loadAccountMap(); - /** @todo Then, reset the VoIP link with the new information */ + if (_dbus) _dbus->getConfigurationManager()->accountsChanged(); } void