Fixes in command handling
This commit is contained in:
parent
641bd27b77
commit
5c065a8e48
4 changed files with 10 additions and 14 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue