From b9491718282f86b77c2594f161b096903706edc1 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Thu, 17 Jan 2019 09:12:01 -0600 Subject: update test-find-peaks to test the first event --- src/test-find-peaks.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/test-find-peaks.c') 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; -- cgit