bugfix packet demux
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2023-06-23 17:44:18 +02:00
parent f79acca1d6
commit 4a8e111a18
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -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) {