some more correctioons

This commit is contained in:
Robin Müller 2020-06-29 15:46:16 +02:00
parent b81b458ba6
commit d5d968a393
2 changed files with 14 additions and 16 deletions

View File

@ -105,18 +105,18 @@ ReturnValue_t LocalDataPoolManager::generateHousekeepingPacket(sid_t sid) {
}
// and now we set a HK message and send it the HK packet destination.
//HousekeepingMessage hkMessage;
// hkMessage.setHkReportMessage(sid, storeId);
// if(hkQueue == nullptr) {
// return QUEUE_NOT_SET;
// }
//
// if(currentHkPacketDestination != MessageQueueIF::NO_QUEUE) {
// result = hkQueue->sendMessage(currentHkPacketDestination, &hkMessage);
// }
// else {
// result = hkQueue->sendToDefault(&hkMessage);
// }
CommandMessage hkMessage;
HousekeepingMessage::setHkReportMessage(&hkMessage, sid, storeId);
if(hkQueue == nullptr) {
return QUEUE_NOT_SET;
}
if(currentHkPacketDestination != MessageQueueIF::NO_QUEUE) {
result = hkQueue->sendMessage(currentHkPacketDestination, &hkMessage);
}
else {
result = hkQueue->sendToDefault(&hkMessage);
}
return result;
}

View File

@ -90,11 +90,9 @@ void CommandMessage::setReplyRejected(ReturnValue_t reason,
ReturnValue_t CommandMessage::getReplyRejectedReason(
Command_t *initialCommand) const {
ReturnValue_t reason = HasReturnvaluesIF::RETURN_FAILED;
std::memcpy(&reason, getData(), sizeof(reason));
ReturnValue_t reason = getParameter();
if(initialCommand != nullptr) {
std::memcpy(initialCommand, getData() + sizeof(reason),
sizeof(Command_t));
*initialCommand = getParameter2();
}
return reason;
}