bug found by unittest

This commit is contained in:
Ulrich Mohr 2022-09-14 16:31:36 +02:00
parent 253aa30263
commit 6c711415c1
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ void ActionHelper::prepareExecution(MessageQueueId_t commandedBy, ActionId_t act
}
Action* action = actionIter->second;
result = action->deSerialize(&dataPtr, &size, SerializeIF::Endianness::NETWORK);
if ((result != HasReturnvaluesIF::RETURN_OK)){
if ((result != returnvalue::OK) or (size != 0)){
CommandMessage reply;
ActionMessage::setStepReply(&reply, actionId, 0, HasActionsIF::INVALID_PARAMETERS);
queueToUse->sendMessage(commandedBy, &reply);

View File

@ -57,7 +57,7 @@ void SimpleActionHelper::prepareExecution(MessageQueueId_t commandedBy, ActionId
}
Action* action = actionIter->second;
result = action->deSerialize(&dataPtr, &size, SerializeIF::Endianness::NETWORK);
if (result != HasReturnvaluesIF::RETURN_OK){
if ((result != returnvalue::OK) or (size != 0)) {
CommandMessage reply;
ActionMessage::setStepReply(&reply, actionId, 0, HasActionsIF::INVALID_PARAMETERS);
queueToUse->sendMessage(commandedBy, &reply);