diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-10-25 10:57:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-10-25 10:57:43 +0000 |
commit | 42dbd0d48e6bd38d58c7d58d523f5f71efed22a0 (patch) | |
tree | 55113c83d4002cfd8a044ac736d579ad2bc85118 /src/statistics/gnunet-statistics.c | |
parent | f4dfb3bfeadf3ce0788fef942804fe4f25e7fc99 (diff) | |
download | gnunet-42dbd0d48e6bd38d58c7d58d523f5f71efed22a0.tar.gz gnunet-42dbd0d48e6bd38d58c7d58d523f5f71efed22a0.zip |
make sure stats that are being set can be committed on destroy
Diffstat (limited to 'src/statistics/gnunet-statistics.c')
-rw-r--r-- | src/statistics/gnunet-statistics.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c index dd9850418..f51452699 100644 --- a/src/statistics/gnunet-statistics.c +++ b/src/statistics/gnunet-statistics.c | |||
@@ -91,7 +91,8 @@ cleanup (void *cls, int success) | |||
91 | if (success != GNUNET_OK) | 91 | if (success != GNUNET_OK) |
92 | ret = 1; | 92 | ret = 1; |
93 | if (h != NULL) | 93 | if (h != NULL) |
94 | GNUNET_STATISTICS_destroy (h); | 94 | GNUNET_STATISTICS_destroy (h, |
95 | GNUNET_NO); | ||
95 | } | 96 | } |
96 | 97 | ||
97 | 98 | ||
@@ -130,7 +131,7 @@ run (void *cls, | |||
130 | return; | 131 | return; |
131 | } | 132 | } |
132 | GNUNET_STATISTICS_set (h, name, (uint64_t) val, persistent); | 133 | GNUNET_STATISTICS_set (h, name, (uint64_t) val, persistent); |
133 | GNUNET_STATISTICS_destroy (h); | 134 | GNUNET_STATISTICS_destroy (h, GNUNET_YES); |
134 | return; | 135 | return; |
135 | } | 136 | } |
136 | h = GNUNET_STATISTICS_create (sched, "gnunet-statistics", cfg); | 137 | h = GNUNET_STATISTICS_create (sched, "gnunet-statistics", cfg); |