From 4a8e111a185aef1daf0232bce9784e10199716ba Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 23 Jun 2023 17:44:18 +0200 Subject: [PATCH] bugfix packet demux --- mission/tmtc/PusLiveDemux.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mission/tmtc/PusLiveDemux.cpp b/mission/tmtc/PusLiveDemux.cpp index bbe1be4f..28114252 100644 --- a/mission/tmtc/PusLiveDemux.cpp +++ b/mission/tmtc/PusLiveDemux.cpp @@ -10,7 +10,10 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, size_t tmSize) { ReturnValue_t result = returnvalue::OK; for (unsigned int idx = 0; idx < destinations.size(); idx++) { + sif::debug << "Destination size: " << destinations.size() << std::endl; + sif::debug << "Sending" << destinations[idx].name << std::endl; const auto& dest = destinations[idx]; + bool setOrigStoreId = false; if (destinations.size() > 1) { if (idx < destinations.size() - 1) { // Create copy of data to ensure each TM recipient has its own copy. That way, we don't need @@ -26,8 +29,14 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, #endif } } else { - message.setStorageId(origStoreId); + setOrigStoreId = true; + sif::debug << "Setting org store ID" << std::endl; } + } else { + setOrigStoreId = true; + } + if(setOrigStoreId) { + message.setStorageId(origStoreId); } result = ownerQueue.sendMessage(dest.queueId, &message); if (result != returnvalue::OK) {