this iis less confusing
This commit is contained in:
parent
db5e7a535e
commit
b261779ebf
@ -11,28 +11,19 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore,
|
|||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
|
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
|
||||||
const auto& dest = destinations[idx];
|
const auto& dest = destinations[idx];
|
||||||
bool setOrigStoreId = false;
|
if ((destinations.size() > 1) and (idx < (destinations.size() - 1))) {
|
||||||
if (destinations.size() > 1) {
|
// Create copy of data to ensure each TM recipient has its own copy. That way, we don't need
|
||||||
if (idx < destinations.size() - 1) {
|
// to bother with send order and where the data is deleted.
|
||||||
// Create copy of data to ensure each TM recipient has its own copy. That way, we don't need
|
store_address_t storeId;
|
||||||
// to bother with send order and where the data is deleted.
|
result = tmStore.addData(&storeId, tmData, tmSize);
|
||||||
store_address_t storeId;
|
if (result == returnvalue::OK) {
|
||||||
result = tmStore.addData(&storeId, tmData, tmSize);
|
message.setStorageId(storeId);
|
||||||
if (result == returnvalue::OK) {
|
|
||||||
message.setStorageId(storeId);
|
|
||||||
} else {
|
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
|
||||||
sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy"
|
|
||||||
<< std::endl;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
setOrigStoreId = true;
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setOrigStoreId = true;
|
|
||||||
}
|
|
||||||
if (setOrigStoreId) {
|
|
||||||
message.setStorageId(origStoreId);
|
message.setStorageId(origStoreId);
|
||||||
}
|
}
|
||||||
result = ownerQueue.sendMessage(dest.queueId, &message);
|
result = ownerQueue.sendMessage(dest.queueId, &message);
|
||||||
|
Loading…
Reference in New Issue
Block a user