From e8b1209b3dad18eb6a3dba2cec4db78303b54fdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Mon, 3 Jul 2023 08:31:34 -0400 Subject: [PATCH] misc: fix some build warning and add ut_bootstrap to CMakeLists Change-Id: I114a876bf6becacac00eec362a4481f3b0de6494 --- CMakeLists.txt | 4 +++ src/connectivity/connectionmanager.h | 49 ++++++++++++++-------------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d62db32e7f..e6d79ac8c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -701,6 +701,10 @@ else() target_compile_definitions(ut_library PUBLIC ENABLE_VIDEO) endif() + add_executable(ut_bootstrap test/unitTest/swarm/bootstrap.cpp) + target_link_libraries(ut_bootstrap ut_library) + add_test(NAME bootstrap COMMAND ut_bootstrap) + add_executable(ut_conversationRepository test/unitTest/conversationRepository/conversationRepository.cpp) target_link_libraries(ut_conversationRepository ut_library) add_test(NAME conversationRepository COMMAND ut_conversationRepository) diff --git a/src/connectivity/connectionmanager.h b/src/connectivity/connectionmanager.h index 79f9fb3d22..d2fc5d037d 100644 --- a/src/connectivity/connectionmanager.h +++ b/src/connectivity/connectionmanager.h @@ -233,6 +233,24 @@ public: ~Config() {} + std::shared_ptr<dht::DhtRunner> dht_; + const dht::crypto::Identity& id_; + + const dht::crypto::Identity& identity() const { return id_; } + + /** + * UPnP IGD controller and the mutex to access it + */ + bool upnpEnabled_; + mutable std::mutex upnp_mtx {}; + std::shared_ptr<jami::upnp::Controller> upnpCtrl_; + + /** + * returns whether or not UPnP is enabled and active + * ie: if it is able to make port mappings + */ + bool getUPnPActive() const; + /** * Determine if STUN public address resolution is required to register this account. In this * case a STUN server hostname must be specified. @@ -244,13 +262,6 @@ public: * softphone stay behind a NAT. */ std::string stunServer_ {}; - - /** - * Determine if TURN public address resolution is required to register this account. In this - * case a TURN server hostname must be specified. - */ - bool turnEnabled_ {false}; - /** * The TURN server hostname (optional), used to provide the public IP address in case the * softphone stay behind a NAT. @@ -260,31 +271,19 @@ public: std::string turnServerPwd_; std::string turnServerRealm_; + /** + * Determine if TURN public address resolution is required to register this account. In this + * case a TURN server hostname must be specified. + */ + bool turnEnabled_ {false}; + mutable std::mutex cachedTurnMutex_ {}; std::unique_ptr<IpAddr> cacheTurnV4_ {}; std::unique_ptr<IpAddr> cacheTurnV6_ {}; std::string cachePath {}; - std::shared_ptr<dht::DhtRunner> dht_; - const dht::crypto::Identity& id_; - - const dht::crypto::Identity& identity() const { return id_; } - tls::CertificateStore* certStore_; - - /** - * UPnP IGD controller and the mutex to access it - */ - bool upnpEnabled_; - mutable std::mutex upnp_mtx {}; - std::shared_ptr<jami::upnp::Controller> upnpCtrl_; - - /** - * returns whether or not UPnP is enabled and active - * ie: if it is able to make port mappings - */ - bool getUPnPActive() const; }; } // namespace jami \ No newline at end of file -- GitLab