Skip to content
Snippets Groups Projects
Commit f1994189 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Print "All good" or "All bad" when trying to recover or split a packet

At Nelgin's suggestion, if all the messages in a packet are either good or bad, say so (since no .good or .bad file will be generated in that case).
parent 33a610ee
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2441 passed
......@@ -366,16 +366,20 @@ int main(int argc, char** argv)
fclose(good);
good = NULL;
if(length <= sizeof(fpkthdr_t) + sizeof(uint16_t) // no messages
|| length == ftell(fp))
|| length == ftell(fp)) {
puts("All good.");
remove(good_fname);
}
}
if(bad != NULL) {
long length = ftell(bad);
fclose(bad);
bad = NULL;
if(length <= sizeof(fpkthdr_t) + sizeof(uint16_t) // no messages
|| length == ftell(fp))
|| length == ftell(fp)) {
puts("All bad.");
remove(bad_fname);
}
}
fclose(fp);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment