hook by id fix
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 12 Aug 2004 15:39:03 +0000 (15:39 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 12 Aug 2004 15:39:03 +0000 (15:39 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@713 04897980-b3bd-0310-b5e0-8ef037075253

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

index e0ddd00616f8ebc88931e68210f25bfad718c075..2150ae3724600a7330e68837db5d924947947111 100644 (file)
@@ -359,9 +359,8 @@ void lttv_tracefile_context_add_hooks(LttvTracefileContext *self,
   lttv_hooks_add_list(self->event, event);
   if(event_by_id != NULL)
     for(i = 0; i < lttv_hooks_by_id_max_id(event_by_id); i++) {
-      hook = lttv_hooks_by_id_get(self->event_by_id, i);
-      if(hook != NULL)
-        lttv_hooks_remove_list(hook, lttv_hooks_by_id_get(event_by_id, i));
+      hook = lttv_hooks_by_id_find(self->event_by_id, i);
+      lttv_hooks_add_list(hook, lttv_hooks_by_id_get(event_by_id, i));
     }
 
 }
@@ -379,8 +378,9 @@ void lttv_tracefile_context_remove_hooks(LttvTracefileContext *self,
   lttv_hooks_remove_list(self->event, event);
   if(event_by_id != NULL)
     for(i = 0; i < lttv_hooks_by_id_max_id(event_by_id); i++) {
-      hook = lttv_hooks_by_id_find(self->event_by_id, i);
-      lttv_hooks_add_list(hook, lttv_hooks_by_id_get(event_by_id, i));
+      hook = lttv_hooks_by_id_get(self->event_by_id, i);
+      if(hook != NULL)
+        lttv_hooks_remove_list(hook, lttv_hooks_by_id_get(event_by_id, i));
     }
 
   lttv_hooks_call(after_tracefile, self);
This page took 0.025253 seconds and 4 git commands to generate.