diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-02-16 09:54:52 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-02-16 09:54:52 -0800 |
commit | 61b413b57f317785e067dd36dd54e6bd480c84ca (patch) | |
tree | c4554e3e43dad652b243d23b781fd00197574688 | |
parent | d2c0203dc98d26bea1f0167053a77e0fe02c150c (diff) | |
download | infinitytier-61b413b57f317785e067dd36dd54e6bd480c84ca.tar.gz infinitytier-61b413b57f317785e067dd36dd54e6bd480c84ca.zip |
Found it in a few other places.
-rw-r--r-- | service/ControlPlane.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/service/ControlPlane.cpp b/service/ControlPlane.cpp index 5fbe01a6..8f59b0d2 100644 --- a/service/ControlPlane.cpp +++ b/service/ControlPlane.cpp @@ -70,9 +70,9 @@ static void _networkToJson(nlohmann::json &nj,const ZT_VirtualNetworkConfig *nc, nj["status"] = nstatus; nj["type"] = ntype; nj["mtu"] = nc->mtu; - nj["dhcp"] = (bool)(nc->dhcp == 0); - nj["bridge"] = (bool)(nc->bridge == 0); - nj["broadcastEnabled"] = (bool)(nc->broadcastEnabled == 0); + nj["dhcp"] = (bool)(nc->dhcp != 0); + nj["bridge"] = (bool)(nc->bridge != 0); + nj["broadcastEnabled"] = (bool)(nc->broadcastEnabled != 0); nj["portError"] = nc->portError; nj["netconfRevision"] = nc->netconfRevision; nj["portDeviceName"] = portDeviceName; @@ -224,7 +224,7 @@ unsigned int ControlPlane::handleRequest( Utils::snprintf(tmp,sizeof(tmp),"%.10llx",status.address); res["address"] = tmp; res["publicIdentity"] = status.publicIdentity; - res["online"] = (bool)status.online; + res["online"] = (bool)(status.online != 0); res["tcpFallbackActive"] = _svc->tcpFallbackActive(); res["versionMajor"] = ZEROTIER_ONE_VERSION_MAJOR; res["versionMinor"] = ZEROTIER_ONE_VERSION_MINOR; |