From d5d968a39365b2b0c285d8f283a054050e94be3b Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Mon, 29 Jun 2020 15:46:16 +0200 Subject: [PATCH] some more correctioons --- datapoollocal/LocalDataPoolManager.cpp | 24 ++++++++++++------------ ipc/CommandMessage.cpp | 6 ++---- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/datapoollocal/LocalDataPoolManager.cpp b/datapoollocal/LocalDataPoolManager.cpp index bc57468a..55d36a9a 100644 --- a/datapoollocal/LocalDataPoolManager.cpp +++ b/datapoollocal/LocalDataPoolManager.cpp @@ -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; } diff --git a/ipc/CommandMessage.cpp b/ipc/CommandMessage.cpp index 0aeaa79a..1470fe85 100644 --- a/ipc/CommandMessage.cpp +++ b/ipc/CommandMessage.cpp @@ -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; }