X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Flttv%2Ftracecontext.c;h=7e757ba7662b90afb33a34fc0a613dde4e06cd25;hb=a43d67bae425508678e5ae2ffe5dd1e84286b915;hp=30f2da07804595bcab974d277965787d4880e8cc;hpb=420d0f5fb51be897157e95072e93a6fb34b6b93b;p=lttv.git diff --git a/ltt/branches/poly/lttv/lttv/tracecontext.c b/ltt/branches/poly/lttv/lttv/tracecontext.c index 30f2da07..7e757ba7 100644 --- a/ltt/branches/poly/lttv/lttv/tracecontext.c +++ b/ltt/branches/poly/lttv/lttv/tracecontext.c @@ -173,6 +173,7 @@ init(LttvTracesetContext *self, LttvTraceset *ts) /*CHECK why dynamically allocate the time span... and the casing is wroNg*/ self->Time_Span = g_new(TimeInterval,1); lttv_traceset_context_compute_time_span(self, self->Time_Span); + self->e = NULL; } @@ -656,7 +657,11 @@ guint lttv_process_traceset_middle(LttvTracesetContext *self, LttTime end, while(TRUE) { tfc = NULL; g_tree_foreach(pqueue, get_first, &tfc); - if(tfc == NULL) return count; + if(tfc == NULL) + { + self->e = event; + return count; + } /* Have we reached the maximum number of events specified? However, continue for all the events with the same time stamp (CHECK?). Then, @@ -664,7 +669,10 @@ guint lttv_process_traceset_middle(LttvTracesetContext *self, LttTime end, if(count >= nb_events && ltt_time_compare(tfc->timestamp, previous_timestamp) != 0) - return count; + { + self->e = event; + return count; + } previous_timestamp = tfc->timestamp;