Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit aa688fee authored by Michael Ott's avatar Michael Ott
Browse files

Next try on fixing removal of queries from the list in DCDBQuery::execute()

parent ee34526e
......@@ -427,12 +427,8 @@ void DCDBQuery::execute() {
std::list<DCDB::SensorDataStoreReading> results;
DCDB::Sensor sensor(connection, q->first);
q = range.second;
// Move iterator to the next element now, because we may remove the current element below and invalidate the iterator
if (q != queries.end()) {
q++;
}
// Query aggregates first
auto it=range.first;
while(it!=range.second) {
......@@ -441,15 +437,14 @@ void DCDBQuery::execute() {
if (results.size() > 0) {
genOutput(results, it, std::next(it));
results.clear();
// Remove the query from the list so it doesn't show up in the raw values below anymore
if (it == range.first) {
range.first = std::next(it);
}
it = queries.erase(it);
continue;
}
}
if (it != range.second) {
// Remove the query from the list so it doesn't show up in the raw values below anymore
if (it == range.first) {
range.first = std::next(it);
}
it = queries.erase(it);
continue;
} else {
it++;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment