SysInfo: Use -1 for "no" with INTERNET_CONNECTIVITY and LAN_CONNECTIVITY

This commit is contained in:
Birunthan Mohanathas 2013-12-22 16:24:16 +00:00
parent acbd0da292
commit 76e562f4f5

View File

@ -393,11 +393,11 @@ PLUGIN_EXPORT double Update(void* data)
{ {
const auto connectivity = GetNetworkConnectivity(); const auto connectivity = GetNetworkConnectivity();
return (connectivity & NLM_CONNECTIVITY_IPV4_INTERNET || 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: 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: case MEASURE_WORK_AREA_WIDTH:
return (measure->data != -1) return (measure->data != -1)