Merge pull request 'Bugfix for packet demultiplexing' (#704) from bugfix-packet-demux into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #704 Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
This commit is contained in:
commit
e992f933ec
@ -16,6 +16,13 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
# [v4.0.1] 2023-06-23
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- `PusLiveDemux` packet demultiplexing bugfix where the demultiplexing did not work when there was
|
||||||
|
only one destination available.
|
||||||
|
|
||||||
# [v4.0.0] 2023-06-22
|
# [v4.0.0] 2023-06-22
|
||||||
|
|
||||||
- `eive-tmtc` version v5.0.0
|
- `eive-tmtc` version v5.0.0
|
||||||
|
@ -11,23 +11,20 @@ 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];
|
||||||
if (destinations.size() > 1) {
|
if ((destinations.size() > 1) and (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
|
||||||
// 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.
|
||||||
// to bother with send order and where the data is deleted.
|
store_address_t storeId;
|
||||||
store_address_t storeId;
|
result = tmStore.addData(&storeId, tmData, tmSize);
|
||||||
result = tmStore.addData(&storeId, tmData, tmSize);
|
if (result == returnvalue::OK) {
|
||||||
if (result == returnvalue::OK) {
|
message.setStorageId(storeId);
|
||||||
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 {
|
||||||
message.setStorageId(origStoreId);
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
message.setStorageId(origStoreId);
|
||||||
}
|
}
|
||||||
result = ownerQueue.sendMessage(dest.queueId, &message);
|
result = ownerQueue.sendMessage(dest.queueId, &message);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
|
Loading…
Reference in New Issue
Block a user