/* Subtile modification :
* if tracefile has no event at or after the time requested, it is not put in
- * the queue, as the next read would fail. */
+ * the queue, as the next read would fail.
+ *
+ * Don't forget to empty the traceset pqueue before calling this.
+ */
void lttv_process_trace_seek_time(LttvTraceContext *self, LttTime start)
{
guint i, nb_tracefile;
nb_tracefile = self->tracefiles->len;
- g_tree_destroy(self->ts_context->pqueue);
- self->ts_context->pqueue = g_tree_new(compare_tracefile);
-
GTree *pqueue = self->ts_context->pqueue;
for(i = 0 ; i < nb_tracefile ; i++) {
LttvTraceContext *tc;
+ g_tree_destroy(self->pqueue);
+ self->pqueue = g_tree_new(compare_tracefile);
+
nb_trace = lttv_traceset_number(self->ts);
for(i = 0 ; i < nb_trace ; i++) {
tc = self->traces[i];