diff --git a/src/baseloop.cpp b/src/baseloop.cpp index 2ee98165..9e46b225 100644 --- a/src/baseloop.cpp +++ b/src/baseloop.cpp @@ -66,7 +66,6 @@ std::string BaseLoop::decodeMessage(const std::string& data) std::istringstream stream(data); std::vector cmd; - // split stream while (std::getline(stream, token, ' ') != 0) cmd.push_back(token); @@ -103,7 +102,7 @@ std::string BaseLoop::decodeMessage(const std::string& data) Command* command = new Command(index, (*m_commands)[index], busCommand->getResult().c_str()); // return result - result << command->calcResult(cmd); + result << command->getResult(cmd); delete command; delete busCommand; @@ -130,7 +129,7 @@ std::string BaseLoop::decodeMessage(const std::string& data) Command* command = new Command(index, (*m_commands)[index], cycdata.c_str()); // return result - result << command->calcResult(cmd); + result << command->getResult(cmd); delete command; } else { diff --git a/src/baseloop.h b/src/baseloop.h index 37549f63..0ca9e217 100644 --- a/src/baseloop.h +++ b/src/baseloop.h @@ -76,11 +76,11 @@ private: ClientCommand getCase(const std::string& item) { - if (item == "get") return get; - if (item == "set") return set; - if (item == "cyc") return cyc; - if (item == "dump") return dump; - if (item == "log") return log; + if (strcasecmp(item.c_str(), "get") == 0) return get; + if (strcasecmp(item.c_str(), "set") == 0) return set; + if (strcasecmp(item.c_str(), "cyc") == 0) return cyc; + if (strcasecmp(item.c_str(), "dump") == 0) return dump; + if (strcasecmp(item.c_str(), "log") == 0) return log; return notfound; }