From 3e7274d977a8dbce195966f2219c0cbaf63c010e Mon Sep 17 00:00:00 2001 From: john30 Date: Sat, 22 Apr 2017 08:31:30 +0200 Subject: [PATCH] fix for http get result --- src/ebusd/mainloop.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ebusd/mainloop.cpp b/src/ebusd/mainloop.cpp index 7bbff82d..10ce22aa 100644 --- a/src/ebusd/mainloop.cpp +++ b/src/ebusd/mainloop.cpp @@ -1542,7 +1542,7 @@ string MainLoop::executeGet(vector &args, bool& connected) { ostringstream result; int type = -1; - if (strncmp(uri.c_str(), "/data/", 6) == 0) { + if (uri.substr(0, 6) == "/data/") { string circuit = "", name = ""; size_t pos = uri.find('/', 6); if (pos == string::npos) { @@ -1650,6 +1650,7 @@ string MainLoop::executeGet(vector &args, bool& connected) { } } message->decode(result, verbosity, !first); + first = false; } if (lastCircuit.length() > 0) {