summaryrefslogtreecommitdiffstats
path: root/src/uscxml/debug
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-05-23 10:50:59 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-05-23 10:50:59 (GMT)
commit9f3dfcd9982cff90cf0466413d17fc1061c43f00 (patch)
treee29d0f70ecdfb742e3bbbc522e87281c8bbd58e7 /src/uscxml/debug
parent216e8efb0f1aff9afd3881ab89b49e017e255228 (diff)
downloaduscxml-9f3dfcd9982cff90cf0466413d17fc1061c43f00.zip
uscxml-9f3dfcd9982cff90cf0466413d17fc1061c43f00.tar.gz
uscxml-9f3dfcd9982cff90cf0466413d17fc1061c43f00.tar.bz2
Fixed the 100% CPU utilization bug and replaced the bool() cast operator for data by empty()
Diffstat (limited to 'src/uscxml/debug')
-rw-r--r--src/uscxml/debug/DebuggerServlet.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/uscxml/debug/DebuggerServlet.cpp b/src/uscxml/debug/DebuggerServlet.cpp
index a99aaf8..17c11d6 100644
--- a/src/uscxml/debug/DebuggerServlet.cpp
+++ b/src/uscxml/debug/DebuggerServlet.cpp
@@ -24,7 +24,7 @@
namespace uscxml {
void DebuggerServlet::pushData(boost::shared_ptr<DebugSession> session, Data pushData) {
- std::cout << "trying to push " << pushData["replyType"].atom << std::endl;
+ std::cout << "trying to push " << pushData.at("replyType").atom << std::endl;
if (!session) {
if (_sendQueues.size() > 0) // logging is not aware of its interpreter
@@ -44,7 +44,7 @@ void DebuggerServlet::serverPushData(boost::shared_ptr<DebugSession> session) {
return;
Data reply = _sendQueues[session].pop();
- std::cout << "pushing " << reply["replyType"].atom << std::endl;
+ std::cout << "pushing " << reply.at("replyType").atom << std::endl;
returnData(_clientConns[session], reply);
_clientConns[session] = HTTPServer::Request();
}
@@ -117,7 +117,7 @@ bool DebuggerServlet::httpRecvRequest(const HTTPServer::Request& request) {
replyData.compound["status"] = Data("failure", Data::VERBATIM);
replyData.compound["reason"] = Data("No such session", Data::VERBATIM);
}
- if (replyData) {
+ if (!replyData.empty()) {
returnData(request, replyData);
return true;
}
@@ -165,7 +165,7 @@ bool DebuggerServlet::httpRecvRequest(const HTTPServer::Request& request) {
replyData = session->debugEval(request.data["content"]);
}
- if (replyData) {
+ if (!replyData.empty()) {
returnData(request, replyData);
return true;
}