diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-07-15 11:30:44 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-07-15 11:30:44 +0000 |
commit | a42b94500a2b8bb7a3a198440b092647946cd907 (patch) | |
tree | 14efe7aab8b2c4873e68567b4e973179ef3a18ed /src/testing/testing_group.c | |
parent | 4e52228385ab71148d8469d3894b69c61b2d944c (diff) | |
download | gnunet-a42b94500a2b8bb7a3a198440b092647946cd907.tar.gz gnunet-a42b94500a2b8bb7a3a198440b092647946cd907.zip |
stupid code
Diffstat (limited to 'src/testing/testing_group.c')
-rw-r--r-- | src/testing/testing_group.c | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c index 1aa3cc134..23ce2a36c 100644 --- a/src/testing/testing_group.c +++ b/src/testing/testing_group.c | |||
@@ -2809,19 +2809,18 @@ create_and_copy_friend_files(struct GNUNET_TESTING_PeerGroup *pg) | |||
2809 | fclose (temp_friend_handle); | 2809 | fclose (temp_friend_handle); |
2810 | 2810 | ||
2811 | if (GNUNET_OK | 2811 | if (GNUNET_OK |
2812 | != GNUNET_CONFIGURATION_get_value_string ( | 2812 | != GNUNET_CONFIGURATION_get_value_string (pg->peers[pg_iter]. |
2813 | pg->peers[pg_iter]. daemon->cfg, | 2813 | daemon->cfg, |
2814 | "PATHS", "SERVICEHOME", | 2814 | "PATHS", "SERVICEHOME", |
2815 | &temp_service_path)) | 2815 | &temp_service_path)) |
2816 | { | 2816 | { |
2817 | GNUNET_log ( | 2817 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
2818 | GNUNET_ERROR_TYPE_WARNING, | 2818 | _("No `%s' specified in peer configuration in section `%s', cannot copy friends file!\n"), |
2819 | _ | ||
2820 | ("No `%s' specified in peer configuration in section `%s', cannot copy friends file!\n"), | ||
2821 | "SERVICEHOME", "PATHS"); | 2819 | "SERVICEHOME", "PATHS"); |
2822 | if (UNLINK (mytemp) != 0) | 2820 | if (UNLINK (mytemp) != 0) |
2823 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", | 2821 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, |
2824 | mytemp); | 2822 | "unlink", |
2823 | mytemp); | ||
2825 | GNUNET_free (mytemp); | 2824 | GNUNET_free (mytemp); |
2826 | break; | 2825 | break; |
2827 | } | 2826 | } |
@@ -2834,7 +2833,9 @@ create_and_copy_friend_files(struct GNUNET_TESTING_PeerGroup *pg) | |||
2834 | GNUNET_assert(procarr[pg_iter] != NULL); | 2833 | GNUNET_assert(procarr[pg_iter] != NULL); |
2835 | #if VERBOSE_TESTING | 2834 | #if VERBOSE_TESTING |
2836 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2835 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2837 | _("Copying file with command cp %s %s\n"), mytemp, arg); | 2836 | "Copying file with command cp %s %s\n", |
2837 | mytemp, | ||
2838 | arg); | ||
2838 | #endif | 2839 | #endif |
2839 | ret = GNUNET_OS_process_wait (procarr[pg_iter]); /* FIXME: schedule this, throttle! */ | 2840 | ret = GNUNET_OS_process_wait (procarr[pg_iter]); /* FIXME: schedule this, throttle! */ |
2840 | GNUNET_OS_process_close (procarr[pg_iter]); | 2841 | GNUNET_OS_process_close (procarr[pg_iter]); |
@@ -2857,12 +2858,17 @@ create_and_copy_friend_files(struct GNUNET_TESTING_PeerGroup *pg) | |||
2857 | ret = GNUNET_OS_process_wait (procarr[pg_iter]); /* FIXME: schedule this, throttle! */ | 2858 | ret = GNUNET_OS_process_wait (procarr[pg_iter]); /* FIXME: schedule this, throttle! */ |
2858 | GNUNET_OS_process_close (procarr[pg_iter]); | 2859 | GNUNET_OS_process_close (procarr[pg_iter]); |
2859 | if (ret != GNUNET_OK) | 2860 | if (ret != GNUNET_OK) |
2860 | return ret; | 2861 | { |
2862 | /* FIXME: free contents of 'procarr' array */ | ||
2863 | GNUNET_free (procarr); | ||
2864 | return ret; | ||
2865 | } | ||
2861 | procarr[pg_iter] = NULL; | 2866 | procarr[pg_iter] = NULL; |
2862 | #if VERBOSE_TESTING | 2867 | #if VERBOSE_TESTING |
2863 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2868 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2864 | _("Copying file with command scp %s %s\n"), mytemp, | 2869 | "Copying file with command scp %s %s\n", |
2865 | arg); | 2870 | mytemp, |
2871 | arg); | ||
2866 | #endif | 2872 | #endif |
2867 | GNUNET_free (arg); | 2873 | GNUNET_free (arg); |
2868 | } | 2874 | } |
@@ -2880,7 +2886,8 @@ create_and_copy_friend_files(struct GNUNET_TESTING_PeerGroup *pg) | |||
2880 | { | 2886 | { |
2881 | #if VERBOSE_TESTING | 2887 | #if VERBOSE_TESTING |
2882 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2888 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2883 | _("Checking copy status of file %d\n"), pg_iter); | 2889 | "Checking copy status of file %d\n", |
2890 | pg_iter); | ||
2884 | #endif | 2891 | #endif |
2885 | if (procarr[pg_iter] != NULL) /* Check for already completed! */ | 2892 | if (procarr[pg_iter] != NULL) /* Check for already completed! */ |
2886 | { | 2893 | { |
@@ -2900,7 +2907,8 @@ create_and_copy_friend_files(struct GNUNET_TESTING_PeerGroup *pg) | |||
2900 | procarr[pg_iter] = NULL; | 2907 | procarr[pg_iter] = NULL; |
2901 | #if VERBOSE_TESTING | 2908 | #if VERBOSE_TESTING |
2902 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2909 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2903 | _("File %d copied\n"), pg_iter); | 2910 | "File %d copied\n", |
2911 | pg_iter); | ||
2904 | #endif | 2912 | #endif |
2905 | } | 2913 | } |
2906 | } | 2914 | } |