Fixes in command handling

This commit is contained in:
Ben Gräf 2017-10-16 22:33:18 +02:00
parent 641bd27b77
commit 5c065a8e48
4 changed files with 10 additions and 14 deletions

View file

@ -225,16 +225,12 @@ unsigned Service::setClientStatus(const std::string& clientId, const std::string
return MHD_HTTP_BAD_REQUEST;
}
if (m_clientCommand.find(clientId) != m_clientCommand.end()) {
m_clientCommand[clientId] = ControlCommand();
}
return getClientCommand(clientId, resp);
}
unsigned Service::getClientCommand(const std::string& clientId, std::string& resp)
{
if (m_clientCommand.find(clientId) != m_clientCommand.end()) {
if (m_clientCommand.find(clientId) == m_clientCommand.end()) {
m_clientCommand[clientId] = ControlCommand();
}