diff --git a/Linphone/data/assistant/create-app-sip-account.rc b/Linphone/data/assistant/create-app-sip-account.rc index e74b543db..13d45e05f 100644 --- a/Linphone/data/assistant/create-app-sip-account.rc +++ b/Linphone/data/assistant/create-app-sip-account.rc @@ -24,6 +24,7 @@ 1 1 https://lime.linphone.org/lime-server/lime-server.php + c25519
stun.linphone.org diff --git a/Linphone/data/assistant/use-app-sip-account.rc b/Linphone/data/assistant/use-app-sip-account.rc index cd6975a3a..61e6ec7ee 100644 --- a/Linphone/data/assistant/use-app-sip-account.rc +++ b/Linphone/data/assistant/use-app-sip-account.rc @@ -24,6 +24,7 @@ 1 1 https://lime.linphone.org/lime-server/lime-server.php + c25519
stun.linphone.org diff --git a/Linphone/data/assistant/use-other-sip-account.rc b/Linphone/data/assistant/use-other-sip-account.rc index f8733de1f..f8b2a87ea 100644 --- a/Linphone/data/assistant/use-other-sip-account.rc +++ b/Linphone/data/assistant/use-other-sip-account.rc @@ -21,6 +21,7 @@ +
diff --git a/Linphone/data/config/linphonerc-factory b/Linphone/data/config/linphonerc-factory index 086c87507..f0ef7796c 100644 --- a/Linphone/data/config/linphonerc-factory +++ b/Linphone/data/config/linphonerc-factory @@ -45,7 +45,7 @@ register_only_when_network_is_up=1 rls_uri=sips:rls@sip.linphone.org update_presence_model_timestamp_before_publish_expires_refresh=1 use_cpim=1 -zrtp_key_agreements_suites=MS_ZRTP_KEY_AGREEMENT_K255_KYB512 +zrtp_key_agreements_suites=MS_ZRTP_KEY_AGREEMENT_K255_MLK512,MS_ZRTP_KEY_AGREEMENT_K255_KYB512 [sound] #remove this property for any application that is not Linphone public version itself diff --git a/Linphone/model/core/CoreModel.cpp b/Linphone/model/core/CoreModel.cpp index 0be874ac1..026cba310 100644 --- a/Linphone/model/core/CoreModel.cpp +++ b/Linphone/model/core/CoreModel.cpp @@ -95,6 +95,7 @@ void CoreModel::start() { QString userAgent = ToolModel::computeUserAgent(config); mCore->setUserAgent(Utils::appStringToCoreString(userAgent), LINPHONESDK_VERSION); mCore->start(); + migrate(); setPathAfterStart(); if (SettingsModel::clearLocalLdapFriendsUponStartup(config)) { // Remove ldap friends cache list. If not, old stored friends will take priority on merge and will not be @@ -230,6 +231,35 @@ bool CoreModel::setFetchConfig(QString filePath) { return fetched; } +void CoreModel::migrate() { + std::shared_ptr config = mCore->getConfig(); + int rcVersion = config->getInt(SettingsModel::UiSection, Constants::RcVersionName, 0); + if (rcVersion == Constants::RcVersionCurrent) return; + if (rcVersion > Constants::RcVersionCurrent) { + qWarning() << QStringLiteral("RC file version (%1) is more recent than app rc file version (%2)!!!") + .arg(rcVersion) + .arg(Constants::RcVersionCurrent); + return; + } + + qInfo() << QStringLiteral("Migrate from old rc file (%1 to %2).").arg(rcVersion).arg(Constants::RcVersionCurrent); + for (const auto &account : mCore->getAccountList()) { + auto params = account->getParams(); + if (params->getDomain() == Constants::LinphoneDomain) { + auto newParams = params->clone(); + QString accountIdentity = + (newParams->getIdentityAddress() ? newParams->getIdentityAddress()->asString().c_str() : "no-identity"); + if (rcVersion < 1) { + newParams->setLimeAlgo("c25519"); + qInfo() << "Migrating" << accountIdentity << "for version 1. lime algo = c25519"; + } + account->setParams(newParams); + } + } + + config->setInt(SettingsModel::UiSection, Constants::RcVersionName, Constants::RcVersionCurrent); +} + //--------------------------------------------------------------------------------------------------------------------------- void CoreModel::onAccountAdded(const std::shared_ptr &core, diff --git a/Linphone/model/core/CoreModel.hpp b/Linphone/model/core/CoreModel.hpp index bca43adcb..02c354ec0 100644 --- a/Linphone/model/core/CoreModel.hpp +++ b/Linphone/model/core/CoreModel.hpp @@ -57,6 +57,7 @@ public: QString getFetchConfig(QString filePath, bool *error); void useFetchConfig(QString filePath); bool setFetchConfig(QString filePath); + void migrate(); bool mEnd = false; diff --git a/Linphone/tool/Constants.hpp b/Linphone/tool/Constants.hpp index 32f687ed7..b790e945a 100644 --- a/Linphone/tool/Constants.hpp +++ b/Linphone/tool/Constants.hpp @@ -171,11 +171,7 @@ public: static constexpr char VcardScheme[] = EXECUTABLE_NAME "-desktop:/"; static constexpr int CbsCallInterval = 20; static constexpr char RcVersionName[] = "rc_version"; - static constexpr int RcVersionCurrent = 6; // 2 = Conference URI - // 3 = CPIM on basic chat rooms - // 4 = RTP bundle mode - // 5 = Video Conference URI - // 6 = Publish expires + static constexpr int RcVersionCurrent = 1; // 1 = Lime algo static constexpr char DownloadDefaultFileName[] = "download"; //-------------------------------------------------------------------------------- diff --git a/external/linphone-sdk b/external/linphone-sdk index 110aacf62..d65510fb0 160000 --- a/external/linphone-sdk +++ b/external/linphone-sdk @@ -1 +1 @@ -Subproject commit 110aacf62d2bf4e1714e3c878057533f237d52a5 +Subproject commit d65510fb076de2c8e04b9f352b43a089ff228cf3