From 76e562f4f506f3f969a48ae2942e7df4aa907523 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sun, 22 Dec 2013 16:24:16 +0000 Subject: [PATCH] SysInfo: Use -1 for "no" with INTERNET_CONNECTIVITY and LAN_CONNECTIVITY --- Plugins/PluginSysInfo/SysInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/PluginSysInfo/SysInfo.cpp b/Plugins/PluginSysInfo/SysInfo.cpp index ee0e2bb0..30ae0d25 100644 --- a/Plugins/PluginSysInfo/SysInfo.cpp +++ b/Plugins/PluginSysInfo/SysInfo.cpp @@ -393,11 +393,11 @@ PLUGIN_EXPORT double Update(void* data) { const auto connectivity = GetNetworkConnectivity(); return (connectivity & NLM_CONNECTIVITY_IPV4_INTERNET || - connectivity & NLM_CONNECTIVITY_IPV6_INTERNET) ? 1.0 : 0.0; + connectivity & NLM_CONNECTIVITY_IPV6_INTERNET) ? 1.0 : -1.0; } case MEASURE_LAN_CONNECTIVITY: - return GetNetworkConnectivity() != NLM_CONNECTIVITY_DISCONNECTED ? 1.0 : 0.0; + return GetNetworkConnectivity() != NLM_CONNECTIVITY_DISCONNECTED ? 1.0 : -1.0; case MEASURE_WORK_AREA_WIDTH: return (measure->data != -1)