diff --git a/Network/Network.h b/Network/Network.h index 7d441f5c53..6a8521cd9a 100644 --- a/Network/Network.h +++ b/Network/Network.h @@ -254,7 +254,7 @@ namespace WPEFramework { static Network *_instance; static Network *getInstance() {return _instance;} Config config; - ConnectivityMonitor& connectivityMonitor = ConnectivityMonitor::getInstance(); + ConnectivityMonitor connectivityMonitor; private: PluginHost::IShell* m_service; diff --git a/Network/NetworkConnectivity.cpp b/Network/NetworkConnectivity.cpp index 5caa7c420e..baf41af7e8 100644 --- a/Network/NetworkConnectivity.cpp +++ b/Network/NetworkConnectivity.cpp @@ -542,7 +542,6 @@ namespace WPEFramework { bool ConnectivityMonitor::stopContinuousConnectivityMonitoring() { - LOGINFO("Entry"); if (!isMonitorThreadRunning()) { LOGWARN("Connectivity monitor not running"); @@ -550,6 +549,7 @@ namespace WPEFramework { } cv_.notify_all(); stopFlag = true; + LOGINFO("stoping connectivityMonitor..."); if (thread_.joinable()) { diff --git a/Network/NetworkConnectivity.h b/Network/NetworkConnectivity.h index 9fd639831e..1a286905d7 100644 --- a/Network/NetworkConnectivity.h +++ b/Network/NetworkConnectivity.h @@ -101,11 +101,6 @@ namespace WPEFramework { class ConnectivityMonitor : public Connectivity { public: - static ConnectivityMonitor& getInstance() { - static ConnectivityMonitor instance; - return instance; - } - bool isConnectedToInternet(nsm_ipversion ipversion); nsm_internetState getInternetConnectionState(nsm_ipversion ipversion); std::string getCaptivePortalURI(); @@ -119,7 +114,6 @@ namespace WPEFramework { void signalConnectivityMonitor(); void resetConnectivityCache() { g_internetState = nsm_internetState::UNKNOWN;} - private: ConnectivityMonitor() : stopFlag(false), threadRunning(false), isContinuesMonitoringNeeded(false) { setConnectivityMonitorEndpoints(getConnectivityDefaultEndpoints()); @@ -129,6 +123,7 @@ namespace WPEFramework { LOGINFO("~ConnectivityMonitor"); stopContinuousConnectivityMonitoring(); } + private: std::vector getConnectivityMonitorEndpoints(); ConnectivityMonitor(const ConnectivityMonitor&) = delete; diff --git a/PersistentStore/CMakeLists.txt b/PersistentStore/CMakeLists.txt index 1afd301c4d..baac30eefd 100644 --- a/PersistentStore/CMakeLists.txt +++ b/PersistentStore/CMakeLists.txt @@ -17,12 +17,12 @@ cmake_minimum_required(VERSION 3.14) -project(PersistentStore) +set(PLUGIN_NAME PersistentStore) +set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME}) set(CMAKE_CXX_STANDARD 11) find_package(WPEFramework) -set(MODULE_NAME "${NAMESPACE}${PROJECT_NAME}") set(PLUGIN_PERSISTENTSTORE_MODE "Off" CACHE STRING "Controls if the plugin should run in its own process, in process or remote") set(PLUGIN_PERSISTENTSTORE_URI "ss.eu.prod.developer.comcast.com:443" CACHE STRING "Account scope endpoint") @@ -67,4 +67,4 @@ endif () install(TARGETS ${MODULE_NAME} DESTINATION lib/${STORAGE_DIRECTORY}/plugins) -write_config() +write_config(${PLUGIN_NAME})