[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r10600 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r10600 - gnunet/src/util |
Date: |
Mon, 15 Mar 2010 14:32:48 +0100 |
Author: grothoff
Date: 2010-03-15 14:32:48 +0100 (Mon, 15 Mar 2010)
New Revision: 10600
Modified:
gnunet/src/util/common_logging.c
Log:
copy component name for bulk due to possibility of plugin unloading
Modified: gnunet/src/util/common_logging.c
===================================================================
--- gnunet/src/util/common_logging.c 2010-03-15 12:29:02 UTC (rev 10599)
+++ gnunet/src/util/common_logging.c 2010-03-15 13:32:48 UTC (rev 10600)
@@ -50,6 +50,12 @@
#define BULK_TRACK_SIZE 256
/**
+ * How many characters do we use for matching of
+ * bulk components?
+ */
+#define COMP_TRACK_SIZE 32
+
+/**
* How many characters can a date/time string
* be at most?
*/
@@ -99,9 +105,9 @@
static unsigned int last_bulk_repeat;
/**
- * Component when the last bulk was logged.
+ * Component when the last bulk was logged. Will be 0-terminated.
*/
-static const char *last_bulk_comp;
+static char last_bulk_comp[COMP_TRACK_SIZE+1];
/**
* Running component.
@@ -379,7 +385,7 @@
last_bulk_repeat = 0;
last_bulk_kind = kind;
last_bulk_time = GNUNET_TIME_absolute_get ();
- last_bulk_comp = comp;
+ strncpy (last_bulk_comp, comp, sizeof (last_bulk_comp));
output_message (kind, comp, date, buf);
free (buf);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r10600 - gnunet/src/util,
gnunet <=