diff --git a/linphone-desktop/src/app/paths/Paths.cpp b/linphone-desktop/src/app/paths/Paths.cpp index a8fb4ae65..8893d1532 100644 --- a/linphone-desktop/src/app/paths/Paths.cpp +++ b/linphone-desktop/src/app/paths/Paths.cpp @@ -43,6 +43,7 @@ #define PATH_FRIENDS_LIST "/friends.db" #define PATH_MESSAGE_HISTORY_LIST "/message-history.db" #define PATH_ZRTP_SECRETS "/zidcache" +#define PATH_ZRTP_DATA "/zrtp-lime.db" using namespace std; @@ -199,6 +200,10 @@ string Paths::getZrtpSecretsFilepath () { return getWritableFilePath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + PATH_ZRTP_SECRETS); } +string Paths::getZrtpDataFilepath () { + return getWritableFilePath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + PATH_ZRTP_DATA); +} + string Paths::getUserCertificatesDirpath () { return getWritableDirectoryPath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + PATH_USER_CERTIFICATES); } diff --git a/linphone-desktop/src/app/paths/Paths.hpp b/linphone-desktop/src/app/paths/Paths.hpp index 279cc3e52..6ae13ef2b 100644 --- a/linphone-desktop/src/app/paths/Paths.hpp +++ b/linphone-desktop/src/app/paths/Paths.hpp @@ -45,6 +45,7 @@ namespace Paths { std::string getFriendsListFilepath (); std::string getMessageHistoryFilepath (); std::string getZrtpSecretsFilepath (); + std::string getZrtpDataFilepath (); void migrate (); } diff --git a/linphone-desktop/src/components/core/CoreManager.cpp b/linphone-desktop/src/components/core/CoreManager.cpp index fa748ad23..01853afce 100644 --- a/linphone-desktop/src/components/core/CoreManager.cpp +++ b/linphone-desktop/src/components/core/CoreManager.cpp @@ -92,6 +92,8 @@ void CoreManager::setDatabasesPaths () { void CoreManager::setOtherPaths () { m_core->setZrtpSecretsFile(Paths::getZrtpSecretsFilepath()); + /* this one is actually a database but it MUST be set after the zrtp secrets as it allows automatic migration from old version(secrets, xml) to new version (data, sqlite)*/ + m_core->setZrtpCacheDatabasePath(Paths::getZrtpDataFilepath()); m_core->setUserCertificatesPath(Paths::getUserCertificatesDirpath()); } diff --git a/submodules/bzrtp b/submodules/bzrtp index 556335fee..8e9b45db8 160000 --- a/submodules/bzrtp +++ b/submodules/bzrtp @@ -1 +1 @@ -Subproject commit 556335fee2bbb28e6cbe40510499ef15abef85fb +Subproject commit 8e9b45db8a5ab7deac4a3a2c122af3e5f6239695 diff --git a/submodules/linphone b/submodules/linphone index bfcda8ef5..9368df723 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit bfcda8ef5dae3297ed13e6485f6a85fff3e89a46 +Subproject commit 9368df723805a7d79f53badb0b64f39a6f6bf978