Fix if cluster compiled in but not enabled.

This commit is contained in:
Adam Ierymenko 2015-10-26 13:07:00 -07:00
parent debed1ac2d
commit 6625d79296

View File

@ -364,6 +364,7 @@ unsigned int ControlPlane::handleRequest(
ZT_ClusterStatus cs;
_node->clusterStatus(&cs);
if (cs.clusterSize >= 1) {
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);
clusterJson.append(t);
@ -382,6 +383,7 @@ unsigned int ControlPlane::handleRequest(
}
clusterJson.append(" ]\n\t\t}");
}
}
#endif
Utils::snprintf(json,sizeof(json),