iterator was not incremented
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
parent
5f9e0bf80a
commit
127a8e6124
@ -179,6 +179,9 @@ ReturnValue_t PersistentTmStore::startDumpFromUpTo(uint32_t fromUnixSeconds,
|
|||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
dumpParams.dirIter = directory_iterator(basePath);
|
dumpParams.dirIter = directory_iterator(basePath);
|
||||||
|
if(dumpParams.dirIter == directory_iterator()) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
dumpParams.fromUnixTime = fromUnixSeconds;
|
dumpParams.fromUnixTime = fromUnixSeconds;
|
||||||
dumpParams.untilUnixTime = upToUnixSeconds;
|
dumpParams.untilUnixTime = upToUnixSeconds;
|
||||||
state = State::DUMPING;
|
state = State::DUMPING;
|
||||||
@ -193,6 +196,7 @@ ReturnValue_t PersistentTmStore::loadNextDumpFile() {
|
|||||||
using namespace std::filesystem;
|
using namespace std::filesystem;
|
||||||
dumpParams.currentSize = 0;
|
dumpParams.currentSize = 0;
|
||||||
std::error_code e;
|
std::error_code e;
|
||||||
|
dumpParams.dirIter++;
|
||||||
for (; dumpParams.dirIter != directory_iterator(); dumpParams.dirIter++) {
|
for (; dumpParams.dirIter != directory_iterator(); dumpParams.dirIter++) {
|
||||||
dumpParams.dirEntry = *dumpParams.dirIter;
|
dumpParams.dirEntry = *dumpParams.dirIter;
|
||||||
if (dumpParams.dirEntry.is_directory(e)) {
|
if (dumpParams.dirEntry.is_directory(e)) {
|
||||||
|
@ -24,7 +24,6 @@ bool TmStoreTaskBase::handleOneStore(PersistentTmStoreWithTmQueue& store, Countd
|
|||||||
if (not channel.isBusy()) {
|
if (not channel.isBusy()) {
|
||||||
// TODO: Maybe do a bit of a delay every 100-200 packets?
|
// TODO: Maybe do a bit of a delay every 100-200 packets?
|
||||||
// TODO: We could continously dump until a file swap during active downlink..
|
// TODO: We could continously dump until a file swap during active downlink..
|
||||||
// TODO: handle returnvalue?
|
|
||||||
result = store.dumpNextPacket(channel, dumpedLen, fileHasSwapped);
|
result = store.dumpNextPacket(channel, dumpedLen, fileHasSwapped);
|
||||||
if (result == returnvalue::OK) {
|
if (result == returnvalue::OK) {
|
||||||
dumpsPerformed = true;
|
dumpsPerformed = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user