summaryrefslogtreecommitdiff
path: root/rotord/rotord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/rotord.cpp')
-rwxr-xr-xrotord/rotord.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/rotord/rotord.cpp b/rotord/rotord.cpp
index 6ece98a..b46cebc 100755
--- a/rotord/rotord.cpp
+++ b/rotord/rotord.cpp
@@ -105,13 +105,13 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS
xmlIO XML; //xml object handles the servers responses
XML.addTag("rotor");
- XML.pushTag("rotor");
//can we create a tinyxml object here and pass a pointer to it to the render context?
//can tinyxml output to a string? is there any reason to use poco instead?
if (command.size()) {
if (command[0]=="new") {
+ XML.pushTag("rotor");
if (request.getMethod()=="GET") {
string sID=idGen.createOne().toString(); //create() seems to cause problems
//Creates a new time-based UUID, using the MAC address of one of the system's ethernet adapters.
@@ -135,6 +135,7 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS
}
}
else if (command[0]=="list") {
+ XML.pushTag("rotor");
if (request.getMethod()=="GET") {
//std::list < Poco::AutoPtr < Poco::Task > >::iterator it;
//it=manager.taskList().begin();
@@ -161,6 +162,8 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS
if(task->name()==command[0]) {
//valid session command
found=true;
+ XML.addAttribute("rotor","context",task->name(),0);
+ XML.pushTag("rotor");
if (command.size()==1) {
//just invoking sID
if (request.getMethod()=="DELETE") {
@@ -195,6 +198,7 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS
}
if (!found) {
status=HTTPResponse::HTTP_NOT_FOUND;
+ XML.pushTag("rotor");
XML.addValue("error","Render context not found");
}
}