diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index ff03b7ff5f2efba0aab89886833a0a37bd4635b1..cbf0b537b3d417b2f3a3be3869e632f45e0fdbe3 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -4219,13 +4219,7 @@ void ManagerImpl::loadIptoipProfile() // if ID is IP2IP, unserialize if (accountid == "IP2IP") { - - try { - _directIpAccount->unserialize (map); - } catch (SipAccountException &e) { - _error ("Manager: %s", e.what()); - } - + _directIpAccount->unserialize (map); break; } @@ -4303,14 +4297,7 @@ short ManagerImpl::loadAccountMap() // Fill account with configuration preferences if (tmpAccount != NULL) { - - try { - - tmpAccount->unserialize (map); - } catch (SipAccountException &e) { - _error ("Manager: %s", e.what()); - } - + tmpAccount->unserialize (map); _accountMap[accountid] = tmpAccount; tmpAccount->setVoIPLink(); diff --git a/sflphone-common/src/sip/sipaccount.cpp b/sflphone-common/src/sip/sipaccount.cpp index 6d53363b4c08e1c781f1809ff84d8bc07aedc0bc..3d62708a7c2d323f4a40d28a85bd923b09bf4d38 100644 --- a/sflphone-common/src/sip/sipaccount.cpp +++ b/sflphone-common/src/sip/sipaccount.cpp @@ -340,45 +340,40 @@ void SIPAccount::unserialize (Conf::MappingNode *map) // get srtp submap srtpMap = (Conf::MappingNode *) (map->getValue (srtpKey)); - if (!srtpMap) - throw SipAccountException (" did not found srtp map"); - - srtpMap->getValue(srtpEnableKey, &_srtpEnabled); - srtpMap->getValue(keyExchangeKey, &_srtpKeyExchange); - srtpMap->getValue(rtpFallbackKey, &_srtpFallback); - + if (srtpMap) { + srtpMap->getValue(srtpEnableKey, &_srtpEnabled); + srtpMap->getValue(keyExchangeKey, &_srtpKeyExchange); + srtpMap->getValue(rtpFallbackKey, &_srtpFallback); + } // get zrtp submap zrtpMap = (Conf::MappingNode *) (map->getValue (zrtpKey)); - if (!zrtpMap) - throw SipAccountException (" did not found zrtp map"); - - zrtpMap->getValue(displaySasKey, &_zrtpDisplaySas); - zrtpMap->getValue(displaySasOnceKey, &_zrtpDisplaySasOnce); - zrtpMap->getValue(helloHashEnabledKey, &_zrtpHelloHash); - zrtpMap->getValue(notSuppWarningKey, &_zrtpNotSuppWarning); - + if (zrtpMap) { + zrtpMap->getValue(displaySasKey, &_zrtpDisplaySas); + zrtpMap->getValue(displaySasOnceKey, &_zrtpDisplaySasOnce); + zrtpMap->getValue(helloHashEnabledKey, &_zrtpHelloHash); + zrtpMap->getValue(notSuppWarningKey, &_zrtpNotSuppWarning); + } // get tls submap tlsMap = (Conf::MappingNode *) (map->getValue (tlsKey)); - if (!tlsMap) - throw SipAccountException (" did not found tls map"); - - tlsMap->getValue(tlsEnableKey, &_tlsEnable); - tlsMap->getValue(tlsPortKey, &_tlsPortStr); - tlsMap->getValue(certificateKey, &_tlsCertificateFile); - tlsMap->getValue(calistKey, &_tlsCaListFile); - tlsMap->getValue(ciphersKey, &_tlsCiphers); - tlsMap->getValue(methodKey, &_tlsMethod); - tlsMap->getValue(tlsPasswordKey, &_tlsPassword); - tlsMap->getValue(privateKeyKey, &_tlsPrivateKeyFile); - tlsMap->getValue(requireCertifKey, &_tlsRequireClientCertificate); - tlsMap->getValue(serverKey, &_tlsServerName); - tlsMap->getValue(verifyClientKey, &_tlsVerifyServer); - tlsMap->getValue(verifyServerKey, &_tlsVerifyClient); - // FIXME - tlsMap->getValue(timeoutKey, &_tlsNegotiationTimeoutSec); - tlsMap->getValue(timeoutKey, &_tlsNegotiationTimeoutMsec); + if (tlsMap) { + tlsMap->getValue(tlsEnableKey, &_tlsEnable); + tlsMap->getValue(tlsPortKey, &_tlsPortStr); + tlsMap->getValue(certificateKey, &_tlsCertificateFile); + tlsMap->getValue(calistKey, &_tlsCaListFile); + tlsMap->getValue(ciphersKey, &_tlsCiphers); + tlsMap->getValue(methodKey, &_tlsMethod); + tlsMap->getValue(tlsPasswordKey, &_tlsPassword); + tlsMap->getValue(privateKeyKey, &_tlsPrivateKeyFile); + tlsMap->getValue(requireCertifKey, &_tlsRequireClientCertificate); + tlsMap->getValue(serverKey, &_tlsServerName); + tlsMap->getValue(verifyClientKey, &_tlsVerifyServer); + tlsMap->getValue(verifyServerKey, &_tlsVerifyClient); + // FIXME + tlsMap->getValue(timeoutKey, &_tlsNegotiationTimeoutSec); + tlsMap->getValue(timeoutKey, &_tlsNegotiationTimeoutMsec); + } }