aboutsummaryrefslogtreecommitdiff
path: root/src/test-find-peaks.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test-find-peaks.c')
-rw-r--r--src/test-find-peaks.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test-find-peaks.c b/src/test-find-peaks.c
index ccd581c..0af3fa0 100644
--- a/src/test-find-peaks.c
+++ b/src/test-find-peaks.c
@@ -272,6 +272,18 @@ int main(int argc, char **argv)
goto err;
}
+ /* Skip to the last event so we can traverse them in reverse order. The
+ * reason for this is that for some reason SNOMAN puts the events in
+ * reverse order within each logical record. */
+ while (b.next) {
+ rv = zebra_get_bank(f,&b,b.next);
+
+ if (rv) {
+ fprintf(stderr, "error getting EV bank: %s\n", zebra_err);
+ goto err;
+ }
+ }
+
unpack_ev(b.data, &bev);
ev.run = bev.run;
ev.gtid = bev.gtr_id;