From 6625d7929654803f99b7a69f56a400046314acac Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 26 Oct 2015 13:07:00 -0700 Subject: Fix if cluster compiled in but not enabled. --- service/ControlPlane.cpp | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'service') diff --git a/service/ControlPlane.cpp b/service/ControlPlane.cpp index 9770db90..31eca7b6 100644 --- a/service/ControlPlane.cpp +++ b/service/ControlPlane.cpp @@ -364,23 +364,25 @@ unsigned int ControlPlane::handleRequest( ZT_ClusterStatus cs; _node->clusterStatus(&cs); - 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); - for(unsigned int i=0;i= 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); + for(unsigned int i=0;i