diff options
Diffstat (limited to 'src/testbed/gnunet-service-testbed_cpustatus.c')
-rw-r--r-- | src/testbed/gnunet-service-testbed_cpustatus.c | 7 |
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) | |||
615 | goto reschedule; | 615 | goto reschedule; |
616 | now = GNUNET_TIME_absolute_get (); | 616 | now = GNUNET_TIME_absolute_get (); |
617 | nbs = GNUNET_asprintf (&str, "%llu %d %d\n", now.abs_value / 1000, | 617 | nbs = GNUNET_asprintf (&str, "%llu %d %d\n", now.abs_value / 1000, |
618 | cpu_get_load (), disk_get_load ()); | 618 | ld_cpu, ld_disk); |
619 | if (0 < nbs) | 619 | if (0 < nbs) |
620 | { | 620 | { |
621 | GNUNET_BIO_write (bw, str, nbs); | 621 | GNUNET_BIO_write (bw, str, nbs); |
@@ -707,6 +707,11 @@ GST_stats_destroy () | |||
707 | #elif OSX | 707 | #elif OSX |
708 | GNUNET_free_non_null (prev_cpu_load); | 708 | GNUNET_free_non_null (prev_cpu_load); |
709 | #endif | 709 | #endif |
710 | if (GNUNET_SCHEDULER_NO_TASK != sample_load_task_id) | ||
711 | { | ||
712 | GNUNET_SCHEDULER_cancel (sample_load_task_id); | ||
713 | sample_load_task_id = GNUNET_SCHEDULER_NO_TASK; | ||
714 | } | ||
710 | GNUNET_break (GNUNET_OK == GNUNET_BIO_write_close (bw)); | 715 | GNUNET_break (GNUNET_OK == GNUNET_BIO_write_close (bw)); |
711 | bw = NULL; | 716 | bw = NULL; |
712 | } | 717 | } |