From d7913a105ef6aff2278b357ed178a2aa3345ce5f Mon Sep 17 00:00:00 2001 From: compudj Date: Wed, 29 Aug 2007 14:35:51 +0000 Subject: [PATCH] fix marker hash table git-svn-id: http://ltt.polymtl.ca/svn@2596 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ltt/ltt-private.h | 2 ++ ltt/branches/poly/ltt/markers.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ltt/branches/poly/ltt/ltt-private.h b/ltt/branches/poly/ltt/ltt-private.h index 8d862840..68509eab 100644 --- a/ltt/branches/poly/ltt/ltt-private.h +++ b/ltt/branches/poly/ltt/ltt-private.h @@ -219,6 +219,7 @@ struct _LttType{ char *footer; }; +#if 0 struct _LttEventType{ GQuark name; gchar * description; @@ -228,6 +229,7 @@ struct _LttEventType{ GData *fields_by_name; int has_compact_data; //event header contains compact data (first field) }; +#endif //0 /* Structure LttEvent and LttEventPosition must begin with the _exact_ same * fields in the exact same order. LttEventPosition is a parent of LttEvent. */ diff --git a/ltt/branches/poly/ltt/markers.c b/ltt/branches/poly/ltt/markers.c index ec9ad591..6be38228 100644 --- a/ltt/branches/poly/ltt/markers.c +++ b/ltt/branches/poly/ltt/markers.c @@ -414,8 +414,10 @@ int marker_id_event(LttTrace *trace, GQuark name, guint16 id, head = g_hash_table_lookup(trace->markers_hash, (gconstpointer)name); if (!head) g_hash_table_insert(trace->markers_hash, (gpointer)name, info); - else - head->next = info; + else { + g_hash_table_replace(trace->markers_hash, (gpointer)name, info); + info->next = head; + } } int allocate_marker_data(LttTrace *trace) -- 2.34.1