Skip to content
Snippets Groups Projects
Commit 87daf416 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

* #6547: do not throw exceptions if some settings are not present in config file

parent 09ccfb2b
No related branches found
No related tags found
No related merge requests found
...@@ -4219,13 +4219,7 @@ void ManagerImpl::loadIptoipProfile() ...@@ -4219,13 +4219,7 @@ void ManagerImpl::loadIptoipProfile()
// if ID is IP2IP, unserialize // if ID is IP2IP, unserialize
if (accountid == "IP2IP") { if (accountid == "IP2IP") {
try {
_directIpAccount->unserialize (map); _directIpAccount->unserialize (map);
} catch (SipAccountException &e) {
_error ("Manager: %s", e.what());
}
break; break;
} }
...@@ -4303,14 +4297,7 @@ short ManagerImpl::loadAccountMap() ...@@ -4303,14 +4297,7 @@ short ManagerImpl::loadAccountMap()
// Fill account with configuration preferences // Fill account with configuration preferences
if (tmpAccount != NULL) { if (tmpAccount != NULL) {
try {
tmpAccount->unserialize (map); tmpAccount->unserialize (map);
} catch (SipAccountException &e) {
_error ("Manager: %s", e.what());
}
_accountMap[accountid] = tmpAccount; _accountMap[accountid] = tmpAccount;
tmpAccount->setVoIPLink(); tmpAccount->setVoIPLink();
......
...@@ -340,30 +340,24 @@ void SIPAccount::unserialize (Conf::MappingNode *map) ...@@ -340,30 +340,24 @@ void SIPAccount::unserialize (Conf::MappingNode *map)
// get srtp submap // get srtp submap
srtpMap = (Conf::MappingNode *) (map->getValue (srtpKey)); srtpMap = (Conf::MappingNode *) (map->getValue (srtpKey));
if (!srtpMap) if (srtpMap) {
throw SipAccountException (" did not found srtp map");
srtpMap->getValue(srtpEnableKey, &_srtpEnabled); srtpMap->getValue(srtpEnableKey, &_srtpEnabled);
srtpMap->getValue(keyExchangeKey, &_srtpKeyExchange); srtpMap->getValue(keyExchangeKey, &_srtpKeyExchange);
srtpMap->getValue(rtpFallbackKey, &_srtpFallback); srtpMap->getValue(rtpFallbackKey, &_srtpFallback);
}
// get zrtp submap // get zrtp submap
zrtpMap = (Conf::MappingNode *) (map->getValue (zrtpKey)); zrtpMap = (Conf::MappingNode *) (map->getValue (zrtpKey));
if (!zrtpMap) if (zrtpMap) {
throw SipAccountException (" did not found zrtp map");
zrtpMap->getValue(displaySasKey, &_zrtpDisplaySas); zrtpMap->getValue(displaySasKey, &_zrtpDisplaySas);
zrtpMap->getValue(displaySasOnceKey, &_zrtpDisplaySasOnce); zrtpMap->getValue(displaySasOnceKey, &_zrtpDisplaySasOnce);
zrtpMap->getValue(helloHashEnabledKey, &_zrtpHelloHash); zrtpMap->getValue(helloHashEnabledKey, &_zrtpHelloHash);
zrtpMap->getValue(notSuppWarningKey, &_zrtpNotSuppWarning); zrtpMap->getValue(notSuppWarningKey, &_zrtpNotSuppWarning);
}
// get tls submap // get tls submap
tlsMap = (Conf::MappingNode *) (map->getValue (tlsKey)); tlsMap = (Conf::MappingNode *) (map->getValue (tlsKey));
if (!tlsMap) if (tlsMap) {
throw SipAccountException (" did not found tls map");
tlsMap->getValue(tlsEnableKey, &_tlsEnable); tlsMap->getValue(tlsEnableKey, &_tlsEnable);
tlsMap->getValue(tlsPortKey, &_tlsPortStr); tlsMap->getValue(tlsPortKey, &_tlsPortStr);
tlsMap->getValue(certificateKey, &_tlsCertificateFile); tlsMap->getValue(certificateKey, &_tlsCertificateFile);
...@@ -380,6 +374,7 @@ void SIPAccount::unserialize (Conf::MappingNode *map) ...@@ -380,6 +374,7 @@ void SIPAccount::unserialize (Conf::MappingNode *map)
tlsMap->getValue(timeoutKey, &_tlsNegotiationTimeoutSec); tlsMap->getValue(timeoutKey, &_tlsNegotiationTimeoutSec);
tlsMap->getValue(timeoutKey, &_tlsNegotiationTimeoutMsec); tlsMap->getValue(timeoutKey, &_tlsNegotiationTimeoutMsec);
} }
}
void SIPAccount::setAccountDetails (std::map<std::string, std::string> details) void SIPAccount::setAccountDetails (std::map<std::string, std::string> details)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment