From: compudj Date: Wed, 29 Aug 2007 14:35:51 +0000 (+0000) Subject: fix marker hash table X-Git-Tag: v0.12.20~893 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=d7913a105ef6aff2278b357ed178a2aa3345ce5f;hp=3c165eaf5aa1e60ce88c036cfb692ce3e1d81585;p=lttv.git fix marker hash table git-svn-id: http://ltt.polymtl.ca/svn@2596 04897980-b3bd-0310-b5e0-8ef037075253 --- 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)