From ae892c3e5bdead2812174383bbb53d0fa2b03234 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 18 May 2016 09:03:44 -0400 Subject: [PATCH] Turn off some debugging in the server. --- src/server/RestStructs.cpp | 4 ++-- src/server/WebSocket.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/RestStructs.cpp b/src/server/RestStructs.cpp index 0b89c4c..c621571 100644 --- a/src/server/RestStructs.cpp +++ b/src/server/RestStructs.cpp @@ -44,7 +44,7 @@ RestInputStruct::RestInputStruct(QString message, bool isRest){ //Now Parse out the Body into the JSON fields and/or arguments structure //NOTE: if the body of the message is encrypted, then it needs to be decrypted outside the struct first, // then run the "ParseBodyIntoJson()" function to read/convert the data as needed. - qDebug() << "Got request:" << message << isRest << Header << bridgeID; + //qDebug() << "Got request:" << message << isRest << Header << bridgeID; if(Header.isEmpty() || isRest){ //no other data processing needed ParseBodyIntoJson(); } @@ -53,7 +53,7 @@ RestInputStruct::RestInputStruct(QString message, bool isRest){ RestInputStruct::~RestInputStruct(){} void RestInputStruct::ParseBodyIntoJson(){ - if(Body.endsWith("\n")){ Body.chop(1); } + while(Body.endsWith("\n")){ Body.chop(1); } if(Body.startsWith("{") && Body.endsWith("}") ){ QJsonDocument doc = QJsonDocument::fromJson(Body.toUtf8()); if(!doc.isNull() && doc.isObject() ){ diff --git a/src/server/WebSocket.cpp b/src/server/WebSocket.cpp index 4ca3b66..b318930 100644 --- a/src/server/WebSocket.cpp +++ b/src/server/WebSocket.cpp @@ -175,7 +175,7 @@ void WebSocket::EvaluateREST(QString msg){ } void WebSocket::EvaluateRequest(const RestInputStruct &REQ){ - qDebug() << "Evaluate Request:" << REQ.namesp << REQ.name << REQ.args; + //qDebug() << "Evaluate Request:" << REQ.namesp << REQ.name << REQ.args; RestOutputStruct out; out.in_struct = REQ; QHostAddress host;