summaryrefslogtreecommitdiff
path: root/rotord/src/rendercontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/rendercontext.cpp')
-rw-r--r--rotord/src/rendercontext.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/rotord/src/rendercontext.cpp b/rotord/src/rendercontext.cpp
index c3d8b93..2f07c89 100644
--- a/rotord/src/rendercontext.cpp
+++ b/rotord/src/rendercontext.cpp
@@ -420,14 +420,20 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H
if (command.commands[1]=="features") {
if (command.method=="GET") {
if(state==IDLE){
- //parse json to get preview spec, return XML? this is a mess
- string features_node=command.commands[2];
- if (graph.print_features(XML,features_node)) {
- status=HTTPResponse::HTTP_OK;
+ if (command.commands.size()>2){
+ //parse json to get preview spec, return XML? this is a mess
+ string features_node=command.commands[2];
+ if (graph.print_features(XML,features_node)) {
+ status=HTTPResponse::HTTP_OK;
+ }
+ else {
+ status=HTTPResponse::HTTP_BAD_REQUEST;
+ logger.error("ERROR: Could not print features for node /"+features_node+"/");
+ }
}
else {
status=HTTPResponse::HTTP_BAD_REQUEST;
- logger.error("ERROR: Could not print features for node /"+features_node+"/");
+ logger.error("ERROR: Features node not specified");
}
}
else {