Commit 543542bc authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Set rls_uri when migrating config file from GTK version to Qt version so that...

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.
parent a6dfdd1c
......@@ -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";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment