mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
Set rls_uri when migrating config file from GTK version to Qt version so that presence switches from peer-to-peer mode to list mode.
This commit is contained in:
parent
a6dfdd1cd1
commit
543542bcfe
1 changed files with 13 additions and 1 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include "config.h"
|
||||
|
||||
#include "Paths.hpp"
|
||||
#include <linphone++/linphone.hh>
|
||||
|
||||
#define PATH_ASSISTANT_CONFIG "/assistant/"
|
||||
#define PATH_AVATARS "/avatars/"
|
||||
|
|
@ -254,6 +255,14 @@ static void migrateConfigurationFile (const QString &oldPath, const QString &new
|
|||
}
|
||||
}
|
||||
|
||||
static void setRlsUri (const QString &configPath) {
|
||||
shared_ptr<linphone::Config> config = linphone::Config::newWithFactory(Utils::appStringToCoreString(configPath), "");
|
||||
if (config->getString("sip", "rls_uri", "").empty()) {
|
||||
config->setString("sip", "rls_uri", "sips:rls@sip.linphone.org");
|
||||
config->sync();
|
||||
}
|
||||
}
|
||||
|
||||
void Paths::migrate () {
|
||||
QString newPath = getAppConfigFilePath();
|
||||
QString oldBaseDir = QSysInfo::productType() == "windows"
|
||||
|
|
@ -261,8 +270,11 @@ void Paths::migrate () {
|
|||
: QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
|
||||
QString oldPath = oldBaseDir + "/.linphonerc";
|
||||
|
||||
if (!filePathExists(newPath) && filePathExists(oldPath))
|
||||
if (!filePathExists(newPath) && filePathExists(oldPath)) {
|
||||
migrateConfigurationFile(oldPath, newPath);
|
||||
/* Define RLS uri so that presence switches from peer-to-peer mode to list mode */
|
||||
setRlsUri(newPath);
|
||||
}
|
||||
|
||||
newPath = getAppCallHistoryFilePath();
|
||||
oldPath = oldBaseDir + "/.linphone-call-history.db";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue