EIVE upstream #29

Merged
muellerr merged 693 commits from use-eive-upstream into develop 2023-06-30 15:44:39 +02:00
Showing only changes of commit cfca27542a - Show all commits

View File

@ -1331,18 +1331,22 @@ ReturnValue_t DeviceHandlerBase::executeAction(ActionId_t actionId, MessageQueue
return result;
}
DeviceCommandMap::iterator iter = deviceCommandMap.find(actionId);
MessageQueueId_t prevRecipient = MessageQueueIF::NO_QUEUE;
if (iter == deviceCommandMap.end()) {
result = COMMAND_NOT_SUPPORTED;
} else if (iter->second.isExecuting) {
result = COMMAND_ALREADY_SENT;
} else {
prevRecipient = iter->second.sendReplyTo;
iter->second.sendReplyTo = commandedBy;
result = buildCommandFromCommand(actionId, data, size);
}
if (result == returnvalue::OK) {
iter->second.sendReplyTo = commandedBy;
iter->second.isExecuting = true;
cookieInfo.pendingCommand = iter;
cookieInfo.state = COOKIE_WRITE_READY;
} else {
iter->second.sendReplyTo = prevRecipient;
}
return result;
}