From 6185a10e2cbb95be990e27bf8c86de696963d887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Wed, 1 May 2019 12:21:35 -0400 Subject: [PATCH] config: add peerDiscovery parameter Change-Id: I45666f799571a5945f61e8a786ff255825ef5e4a --- src/api/account.h | 1 + src/newaccountmodel.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/api/account.h b/src/api/account.h index b237646a..45e19bda 100644 --- a/src/api/account.h +++ b/src/api/account.h @@ -121,6 +121,7 @@ struct ConfProperties_t { bool proxyEnabled; std::string proxyServer; std::string proxyPushToken; + bool peerDiscovery; int registrationExpire; struct Audio_t { int audioPortMax; diff --git a/src/newaccountmodel.cpp b/src/newaccountmodel.cpp index cbc207c9..c12703f5 100644 --- a/src/newaccountmodel.cpp +++ b/src/newaccountmodel.cpp @@ -671,6 +671,7 @@ account::Info::fromDetails(const MapStringString& details) confProperties.proxyEnabled = toBool(details[ConfProperties::PROXY_ENABLED]); confProperties.proxyServer = toStdString(details[ConfProperties::PROXY_SERVER]); confProperties.proxyPushToken = toStdString(details[ConfProperties::PROXY_PUSH_TOKEN]); + confProperties.peerDiscovery = toBool(details[ConfProperties::DHT_PEER_DISCOVERY]); // Audio confProperties.Audio.audioPortMax = toInt(details[ConfProperties::Audio::PORT_MAX]); confProperties.Audio.audioPortMin = toInt(details[ConfProperties::Audio::PORT_MIN]); @@ -768,6 +769,7 @@ account::ConfProperties_t::toDetails() const details[ConfProperties::PROXY_ENABLED] = toQString(this->proxyEnabled); details[ConfProperties::PROXY_SERVER] = toQString(this->proxyServer); details[ConfProperties::PROXY_PUSH_TOKEN] = toQString(this->proxyPushToken); + details[ConfProperties::DHT_PEER_DISCOVERY] = toQString(this->peerDiscovery); // Audio details[ConfProperties::Audio::PORT_MAX] = toQString(this->Audio.audioPortMax); details[ConfProperties::Audio::PORT_MIN] = toQString(this->Audio.audioPortMin); -- GitLab