From 0b82c9ebad55181b9d668498371be84fb5c81b01 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 26 Oct 2015 16:09:56 -0700 Subject: Fix infinite loop if there are no live roots (never happened before?!? wow!) --- service/ControlPlane.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'service/ControlPlane.cpp') diff --git a/service/ControlPlane.cpp b/service/ControlPlane.cpp index 31eca7b6..4978a91d 100644 --- a/service/ControlPlane.cpp +++ b/service/ControlPlane.cpp @@ -265,7 +265,7 @@ unsigned int ControlPlane::handleRequest( std::string &responseBody, std::string &responseContentType) { - char json[1024]; + char json[8194]; unsigned int scode = 404; std::vector ps(Utils::split(path.c_str(),"/","","")); std::map urlArgs; @@ -365,11 +365,12 @@ unsigned int ControlPlane::handleRequest( _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); + char t[1024]; + Utils::snprintf(t,sizeof(t),"{\n\t\t\"myId\": %u,\n\t\t\"clusterSize\": %u,\n\t\t\"members\": [",cs.myId,cs.clusterSize); clusterJson.append(t); for(unsigned int i=0;i