use hook call return value
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 26 May 2004 17:08:03 +0000 (17:08 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 26 May 2004 17:08:03 +0000 (17:08 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@551 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/tracecontext.c

index 5b6cdba7f379122440a57b3aa212ff5547d4315b..d455348f465b34c0383e387d8622c53c8a3573cc 100644 (file)
@@ -612,6 +612,8 @@ guint lttv_process_traceset_middle(LttvTracesetContext *self,
 
   unsigned count = 0;
 
+  gboolean last_ret = FALSE; /* return value of the last hook list called */
+
   /* Get the next event from the pqueue, call its hooks, 
      reinsert in the pqueue the following event from the same tracefile 
      unless the tracefile is finished or the event is later than the 
@@ -634,7 +636,8 @@ guint lttv_process_traceset_middle(LttvTracesetContext *self,
      * break the loop.
      */
 
-    if(count >= nb_events ||
+    if(last_ret == TRUE ||
+       count >= nb_events ||
        lttv_traceset_context_ctx_pos_compare(self,
                                              end_position) >= 0 ||
        ltt_time_compare(tfc->timestamp, end) >= 0)
@@ -651,7 +654,7 @@ guint lttv_process_traceset_middle(LttvTracesetContext *self,
     count++;
 
     id = ltt_event_eventtype_id(tfc->e);
-    lttv_hooks_call_merge(tfc->event, tfc,
+    last_ret = lttv_hooks_call_merge(tfc->event, tfc,
                         lttv_hooks_by_id_get(tfc->event_by_id, id), tfc);
 
     event = ltt_tracefile_read(tfc->tf);
This page took 0.024384 seconds and 4 git commands to generate.