mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-10 19:31:57 +00:00
Fix if cluster compiled in but not enabled.
This commit is contained in:
parent
debed1ac2d
commit
6625d79296
@ -364,6 +364,7 @@ unsigned int ControlPlane::handleRequest(
|
|||||||
ZT_ClusterStatus cs;
|
ZT_ClusterStatus cs;
|
||||||
_node->clusterStatus(&cs);
|
_node->clusterStatus(&cs);
|
||||||
|
|
||||||
|
if (cs.clusterSize >= 1) {
|
||||||
char t[4096];
|
char t[4096];
|
||||||
Utils::snprintf(t,sizeof(t),"{\n\t\t\"myId\": %u,\n\t\t\"clusterSize\": %u,\n\t\t\"members: [\n",cs.myId,cs.clusterSize);
|
Utils::snprintf(t,sizeof(t),"{\n\t\t\"myId\": %u,\n\t\t\"clusterSize\": %u,\n\t\t\"members: [\n",cs.myId,cs.clusterSize);
|
||||||
clusterJson.append(t);
|
clusterJson.append(t);
|
||||||
@ -382,6 +383,7 @@ unsigned int ControlPlane::handleRequest(
|
|||||||
}
|
}
|
||||||
clusterJson.append(" ]\n\t\t}");
|
clusterJson.append(" ]\n\t\t}");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Utils::snprintf(json,sizeof(json),
|
Utils::snprintf(json,sizeof(json),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user