From ea45889aea3f0b25ddd071d82261a733f492e9f1 Mon Sep 17 00:00:00 2001 From: compudj Date: Thu, 4 Aug 2005 23:58:09 +0000 Subject: [PATCH] get new block fix git-svn-id: http://ltt.polymtl.ca/svn@1006 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ltt-newlib/tracefile.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ltt/branches/poly/ltt-newlib/tracefile.c b/ltt/branches/poly/ltt-newlib/tracefile.c index 65f618b8..312829c9 100644 --- a/ltt/branches/poly/ltt-newlib/tracefile.c +++ b/ltt/branches/poly/ltt-newlib/tracefile.c @@ -1359,6 +1359,13 @@ LttEvent *ltt_tracefile_read(LttTracefile *tf) g_error("Can not map block"); return NULL; } + /* seek to the first event */ + err = ltt_seek_next_event(tf); + if(unlikely(err == ERANGE)) { + g_error("event id is out of range\n"); + return NULL; + } + pos = tf->event.offset; } } -- 2.34.1