diff options
| author | Comment <tim@gray.(none)> | 2013-09-17 17:53:36 +0100 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-09-17 17:53:36 +0100 |
| commit | 0b2d918d4e99d0fa0f0a4426a5ee9f275f3fb1fd (patch) | |
| tree | 7d29d6059b560fa9c6ea9b0effdd42f76cbb7309 /rotord/src/rendercontext.cpp | |
| parent | 1df3fe73cfb5866c9843818b487373ee8004fd65 (diff) | |
stop graph print while locking
Diffstat (limited to 'rotord/src/rendercontext.cpp')
| -rw-r--r-- | rotord/src/rendercontext.cpp | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/rotord/src/rendercontext.cpp b/rotord/src/rendercontext.cpp index 8c9c6e4..3903187 100644 --- a/rotord/src/rendercontext.cpp +++ b/rotord/src/rendercontext.cpp @@ -179,22 +179,28 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H } if (command.commands[1]=="graph") { if (command.method=="GET") { - if (graph.loaded) { - status=HTTPResponse::HTTP_OK; - //XML.addValue("patchbay",graph.toString()); - logger.information("Requested graph"); - XML.loadFromBuffer(graph.graphToString()); - } - else { - if (state==LOADING_GRAPH) { - logger.error("ERROR: graph still loading"); - XML.addValue("error","graph still loading"); + if (state!=LOADING_GRAPH) { + if (graph.loaded) { + status=HTTPResponse::HTTP_OK; + //XML.addValue("patchbay",graph.toString()); + logger.information("Requested graph"); + XML.loadFromBuffer(graph.graphToString()); } else { - logger.error("ERROR: graph not loaded"); - XML.addValue("error","graph not loaded"); + if (state==LOADING_GRAPH) { + logger.error("ERROR: graph still loading"); + XML.addValue("error","graph still loading"); + } + else { + logger.error("ERROR: graph not loaded"); + XML.addValue("error","graph not loaded"); + } } } + else { + logger.error("ERROR: Graph loading"); + XML.addValue("error","Graph loading"); + } } if (command.method=="PUT") { //get new graph from file if (command.body!="") { |
