small fixes, but bug introduced here '40895b0148'
Some checks failed
CMake / Configure and build using cmake (push) Failing after 2s

This commit is contained in:
maliakal_d 2025-05-03 00:11:55 +02:00
parent 0f4d10912b
commit 6c604e2340
2 changed files with 7 additions and 5 deletions

View File

@ -130,7 +130,7 @@ std::set<uint64_t> get_valid_fnums(const PortFrameMap &port_frame_map) {
// collect all unique frame numbers from all ports
std::set<uint64_t> unique_fnums;
for (auto it = port_frame_map.begin(); it != port_frame_map.begin(); ++it) {
for (auto it = port_frame_map.begin(); it != port_frame_map.end(); ++it) {
const FrameMap &frame_map = it->second;
for (auto frame = frame_map.begin(); frame != frame_map.end();
++frame) {
@ -151,9 +151,10 @@ std::set<uint64_t> get_valid_fnums(const PortFrameMap &port_frame_map) {
LOG(sls::logDEBUG)
<< "Fnum " << fnum << " is missing in port " << port;
// invalid: fnum greater than all in that port
auto last_frame = std::prev(frame_map.end());
auto last_fnum = last_frame->first;
if (fnum > last_fnum) {
auto last_frame =
frame_map.upper_bound(fnum); // std::prev(frame_map.end());
// auto last_fnum = last_frame->first;
if (last_frame == frame_map.end()) { //(fnum > last_fnum) {
LOG(sls::logDEBUG) << "And no larger fnum found. Fnum "
<< fnum << " is invalid.\n";
is_valid = false;

View File

@ -234,6 +234,7 @@ with open(fname, 'w') as fp:
traceback.print_exc(file=fp_error) # This will log the full traceback
testError = True
cleanup(fp)
break
# redirect to terminal
@ -248,5 +249,5 @@ with open(fname, 'w') as fp:
sys.stdout = original_stdout
sys.stderr = original_stderr
Log(Fore.RED, f'Exception caught with general testing. Cleaning up...')
cleanSharedmemory(sys.stdout)
cleanup(fp)