zrtp cache migration performed by bzrtp and not linphone

- done in place, path to an other file is not needed anymore
This commit is contained in:
Johan Pascal 2017-04-16 18:15:18 +07:00
parent 9836c7ba91
commit c513b5b602
4 changed files with 4 additions and 14 deletions

View file

@ -43,7 +43,6 @@
#define PATH_ROOT_CA "/rootca.pem"
#define PATH_FRIENDS_LIST "/friends.db"
#define PATH_MESSAGE_HISTORY_LIST "/message-history.db"
#define PATH_ZRTP_DATA "/zrtp-lime.db"
#define PATH_ZRTP_SECRETS "/zidcache"
using namespace std;
@ -211,12 +210,8 @@ string Paths::getUserCertificatesDirpath () {
return getWritableDirectoryPath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + PATH_USER_CERTIFICATES);
}
string Paths::getZrtpDataFilepath () {
return getWritableFilePath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + PATH_ZRTP_DATA);
}
string Paths::getZrtpSecretsFilepath () {
return getWritableFilePath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + PATH_ZRTP_SECRETS);
return getWritableFilePath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + PATH_ZRTP_SECRETS);
}
// -----------------------------------------------------------------------------

View file

@ -89,15 +89,10 @@ void CoreManager::setDatabasesPaths () {
mCore->setFriendsDatabasePath(Paths::getFriendsListFilepath());
mCore->setCallLogsDatabasePath(Paths::getCallHistoryFilepath());
mCore->setChatDatabasePath(Paths::getMessageHistoryFilepath());
mCore->setZrtpSecretsFile(Paths::getZrtpSecretsFilepath());
}
void CoreManager::setOtherPaths () {
mCore->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).
mCore->setZrtpCacheDatabasePath(Paths::getZrtpDataFilepath());
mCore->setUserCertificatesPath(Paths::getUserCertificatesDirpath());
mCore->setRootCa(Paths::getRootCaFilepath());

@ -1 +1 @@
Subproject commit 4c37a23c805e7f08c8874d848525a720c165c906
Subproject commit d4cbbbe04e5d47a23e584a6ddc506025d4dcd55d

@ -1 +1 @@
Subproject commit 2637c2a15e3d26720908eaa64ab6b03533979670
Subproject commit 313b60c0047dd04ad9698b848347301c5b86f9ad