summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-04-04 14:51:05 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-04-04 14:51:05 +0000
commita5965ec3faea2aa9b7d425cb65ad021d378af0a8 (patch)
tree40a515e7f20d6c777d421ad1426b7fa4ab5647e2 /src
parent1cb121d3c6048f23eef800a6c33f9936369646bb (diff)
- fix
Diffstat (limited to 'src')
-rw-r--r--src/testbed/gnunet-service-testbed_cpustatus.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/testbed/gnunet-service-testbed_cpustatus.c b/src/testbed/gnunet-service-testbed_cpustatus.c
index c88a031b7..dc48e11cd 100644
--- a/src/testbed/gnunet-service-testbed_cpustatus.c
+++ b/src/testbed/gnunet-service-testbed_cpustatus.c
@@ -615,7 +615,7 @@ sample_load_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
goto reschedule;
now = GNUNET_TIME_absolute_get ();
nbs = GNUNET_asprintf (&str, "%llu %d %d\n", now.abs_value / 1000,
- cpu_get_load (), disk_get_load ());
+ ld_cpu, ld_disk);
if (0 < nbs)
{
GNUNET_BIO_write (bw, str, nbs);
@@ -707,6 +707,11 @@ GST_stats_destroy ()
#elif OSX
GNUNET_free_non_null (prev_cpu_load);
#endif
+ if (GNUNET_SCHEDULER_NO_TASK != sample_load_task_id)
+ {
+ GNUNET_SCHEDULER_cancel (sample_load_task_id);
+ sample_load_task_id = GNUNET_SCHEDULER_NO_TASK;
+ }
GNUNET_break (GNUNET_OK == GNUNET_BIO_write_close (bw));
bw = NULL;
}