From: compudj Date: Thu, 4 Aug 2005 23:58:09 +0000 (+0000) Subject: get new block fix X-Git-Tag: v0.12.20~2483 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ea45889aea3f0b25ddd071d82261a733f492e9f1;p=lttv.git get new block fix git-svn-id: http://ltt.polymtl.ca/svn@1006 04897980-b3bd-0310-b5e0-8ef037075253 --- 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; } }