gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r18671 - gnunet-gtk/src/statistics


From: gnunet
Subject: [GNUnet-SVN] r18671 - gnunet-gtk/src/statistics
Date: Sun, 18 Dec 2011 16:43:26 +0100

Author: grothoff
Date: 2011-12-18 16:43:26 +0100 (Sun, 18 Dec 2011)
New Revision: 18671

Modified:
   gnunet-gtk/src/statistics/gnunet-statistics-gtk.c
Log:
-fix bad value merging by failure to use unique IDs

Modified: gnunet-gtk/src/statistics/gnunet-statistics-gtk.c
===================================================================
--- gnunet-gtk/src/statistics/gnunet-statistics-gtk.c   2011-12-18 11:22:27 UTC 
(rev 18670)
+++ gnunet-gtk/src/statistics/gnunet-statistics-gtk.c   2011-12-18 15:43:26 UTC 
(rev 18671)
@@ -136,11 +136,14 @@
                      int is_persistent)
 {
   GtkStatistics *stats = cls;
+  char *id;
 
+  GNUNET_asprintf (&id, "%s: %s", subsystem, name);
   gtk_statistics_update_value (stats,
-                              name,
+                              id,
                               GNUNET_TIME_absolute_get_duration 
(start_time).rel_value / 1000LL,
                               value);
+  GNUNET_free (id);
   return GNUNET_OK;
 }
 
@@ -171,16 +174,19 @@
   GtkBox *box;
   GtkStatistics *ret;
   unsigned int i;
+  char *id;
 
   ret = GTK_STATISTICS (gtk_statistics_new ());
   box = GTK_BOX (get_object (box_name));
   
   for (i=0; NULL != info[i].subsystem; i++)
   {
+    GNUNET_asprintf (&id, "%s: %s", info[i].subsystem, info[i].name);
     gtk_statistics_add_line (ret,                           
-                            info[i].name,
+                            id,
                             info[i].label,
                             info[i].color_name);
+    GNUNET_free (id);
     GNUNET_STATISTICS_watch (statistics,
                             info[i].subsystem,
                             info[i].name,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]