iterator was not incremented
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2023-03-10 18:27:10 +01:00
parent 5f9e0bf80a
commit 127a8e6124
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 4 additions and 1 deletions

View File

@ -179,6 +179,9 @@ ReturnValue_t PersistentTmStore::startDumpFromUpTo(uint32_t fromUnixSeconds,
return returnvalue::FAILED;
}
dumpParams.dirIter = directory_iterator(basePath);
if(dumpParams.dirIter == directory_iterator()) {
return returnvalue::FAILED;
}
dumpParams.fromUnixTime = fromUnixSeconds;
dumpParams.untilUnixTime = upToUnixSeconds;
state = State::DUMPING;
@ -193,6 +196,7 @@ ReturnValue_t PersistentTmStore::loadNextDumpFile() {
using namespace std::filesystem;
dumpParams.currentSize = 0;
std::error_code e;
dumpParams.dirIter++;
for (; dumpParams.dirIter != directory_iterator(); dumpParams.dirIter++) {
dumpParams.dirEntry = *dumpParams.dirIter;
if (dumpParams.dirEntry.is_directory(e)) {

View File

@ -24,7 +24,6 @@ bool TmStoreTaskBase::handleOneStore(PersistentTmStoreWithTmQueue& store, Countd
if (not channel.isBusy()) {
// 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: handle returnvalue?
result = store.dumpNextPacket(channel, dumpedLen, fileHasSwapped);
if (result == returnvalue::OK) {
dumpsPerformed = true;