diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-04-04 13:37:43 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-04-04 13:37:43 +0000 |
commit | cdd86bad46753710ec2570c926dbe57f1801af43 (patch) | |
tree | 458fbf705ad1b85c869a57d5707c7bee665b24af /src/testbed | |
parent | ff1c4e766d43c2343a7204918840b953329787d7 (diff) | |
download | gnunet-cdd86bad46753710ec2570c926dbe57f1801af43.tar.gz gnunet-cdd86bad46753710ec2570c926dbe57f1801af43.zip |
- disable load statistics on windows
Diffstat (limited to 'src/testbed')
-rw-r--r-- | src/testbed/gnunet-service-testbed_cpustatus.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/testbed/gnunet-service-testbed_cpustatus.c b/src/testbed/gnunet-service-testbed_cpustatus.c index bb187e4d3..c88a031b7 100644 --- a/src/testbed/gnunet-service-testbed_cpustatus.c +++ b/src/testbed/gnunet-service-testbed_cpustatus.c | |||
@@ -643,6 +643,12 @@ GST_stats_init (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
643 | char *stats_dir; | 643 | char *stats_dir; |
644 | char *fn; | 644 | char *fn; |
645 | 645 | ||
646 | #if MINGW | ||
647 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
648 | "Load statistics logging now available for windows\n"); | ||
649 | return; /* No logging on windows for now :( */ | ||
650 | #endif | ||
651 | |||
646 | if (GNUNET_OK != | 652 | if (GNUNET_OK != |
647 | GNUNET_CONFIGURATION_get_value_string (cfg, "testbed", | 653 | GNUNET_CONFIGURATION_get_value_string (cfg, "testbed", |
648 | "STATS_DIR", &stats_dir)) | 654 | "STATS_DIR", &stats_dir)) |
@@ -675,8 +681,6 @@ GST_stats_init (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
675 | "fopen", "/proc/stat"); | 681 | "fopen", "/proc/stat"); |
676 | #elif OSX | 682 | #elif OSX |
677 | initMachCpuStats (); | 683 | initMachCpuStats (); |
678 | #elif MINGW | ||
679 | InitWinEnv (NULL); | ||
680 | #endif | 684 | #endif |
681 | updateUsage (); /* initialize */ | 685 | updateUsage (); /* initialize */ |
682 | 686 | ||
@@ -689,6 +693,9 @@ GST_stats_init (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
689 | void | 693 | void |
690 | GST_stats_destroy () | 694 | GST_stats_destroy () |
691 | { | 695 | { |
696 | #if MINGW | ||
697 | return; | ||
698 | #endif | ||
692 | if (NULL == bw) | 699 | if (NULL == bw) |
693 | return; | 700 | return; |
694 | #ifdef LINUX | 701 | #ifdef LINUX |
@@ -699,8 +706,6 @@ GST_stats_destroy () | |||
699 | } | 706 | } |
700 | #elif OSX | 707 | #elif OSX |
701 | GNUNET_free_non_null (prev_cpu_load); | 708 | GNUNET_free_non_null (prev_cpu_load); |
702 | #elif MINGW | ||
703 | ShutdownWinEnv (); | ||
704 | #endif | 709 | #endif |
705 | GNUNET_break (GNUNET_OK == GNUNET_BIO_write_close (bw)); | 710 | GNUNET_break (GNUNET_OK == GNUNET_BIO_write_close (bw)); |
706 | bw = NULL; | 711 | bw = NULL; |