important bugfix
This commit is contained in:
parent
b742f91ea8
commit
89083cdbc8
@ -70,13 +70,20 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) {
|
||||
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
|
||||
const auto& destVcidPair = destinations[idx];
|
||||
if (destinations.size() > 1) {
|
||||
if (idx <= 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
|
||||
// to bother with send order and where the data is deleted.
|
||||
store_address_t storeId;
|
||||
result = tmStore.addData(&storeId, newPacketData, serSize);
|
||||
if (result == returnvalue::OK) {
|
||||
msg.setStorageId(storeId);
|
||||
} else {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "PusTmFunnel::handlePacket: Store too full to create data copy"
|
||||
<< std::endl;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
msg.setStorageId(origStoreId);
|
||||
}
|
||||
}
|
||||
|
@ -51,13 +51,20 @@ ReturnValue_t PusTmFunnel::handlePacket(TmTcMessage &message) {
|
||||
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
|
||||
const auto &destVcidPair = destinations[idx];
|
||||
if (destinations.size() > 1) {
|
||||
if (idx <= 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
|
||||
// to bother with send order and where the data is deleted.
|
||||
store_address_t storeId;
|
||||
result = tmStore.addData(&storeId, packetData, size);
|
||||
if (result == returnvalue::OK) {
|
||||
message.setStorageId(storeId);
|
||||
} else {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "PusTmFunnel::handlePacket: Store too full to create data copy"
|
||||
<< std::endl;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
message.setStorageId(origStoreId);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user