clean up retvals a bit

This commit is contained in:
2024-11-13 17:30:20 +01:00
parent b2177b2363
commit 66555301fa
10 changed files with 32 additions and 20 deletions

View File

@ -122,9 +122,9 @@ ReturnValue_t PeriodicHelper::handleHousekeepingMessage(CommandMessage* message)
CommandMessage reply;
if (result != returnvalue::OK) {
if (result == WRONG_HK_PACKET_TYPE) {
if (result == INVALID_HK_REQUEST) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "handleHousekeepingMessage",
WRONG_HK_PACKET_TYPE);
INVALID_HK_REQUEST);
}
HousekeepingMessage::setHkRequestFailureReply(&reply, sid, result);
} else {
@ -353,10 +353,8 @@ void PeriodicHelper::printWarningOrError(sif::OutputTypes outputType, const char
if (errorPrint == nullptr) {
if (error == DATASET_NOT_FOUND) {
errorPrint = "Dataset not found";
} else if (error == POOLOBJECT_NOT_FOUND) {
errorPrint = "Pool Object not found";
} else if (error == WRONG_HK_PACKET_TYPE) {
errorPrint = "Wrong Packet Type";
} else if (error == INVALID_HK_REQUEST) {
errorPrint = "Invalid HK request";
} else if (error == returnvalue::FAILED) {
if (outputType == sif::OutputTypes::OUT_WARNING) {
errorPrint = "Generic Warning";