aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/test_mesh_small.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/test_mesh_small.c')
-rw-r--r--src/mesh/test_mesh_small.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c
index f100a40e4..0888c1e00 100644
--- a/src/mesh/test_mesh_small.c
+++ b/src/mesh/test_mesh_small.c
@@ -140,8 +140,6 @@ static GNUNET_SCHEDULER_TaskIdentifier shutdown_handle;
140 140
141static char *topology_file; 141static char *topology_file;
142 142
143static char *data_filename;
144
145static struct GNUNET_TESTING_Daemon *d1; 143static struct GNUNET_TESTING_Daemon *d1;
146 144
147static GNUNET_PEER_Id pid1; 145static GNUNET_PEER_Id pid1;
@@ -753,6 +751,7 @@ run (void *cls, char *const *args, const char *cfgfile,
753 char *temp_str; 751 char *temp_str;
754 unsigned long long temp_wait; 752 unsigned long long temp_wait;
755 struct GNUNET_TESTING_Host *hosts; 753 struct GNUNET_TESTING_Host *hosts;
754 char *data_filename;
756 755
757 ok = 0; 756 ok = 0;
758 testing_cfg = GNUNET_CONFIGURATION_dup (cfg); 757 testing_cfg = GNUNET_CONFIGURATION_dup (cfg);
@@ -801,27 +800,23 @@ run (void *cls, char *const *args, const char *cfgfile,
801 return; 800 return;
802 } 801 }
803 802
804 if (GNUNET_OK != 803 if (GNUNET_OK ==
805 GNUNET_CONFIGURATION_get_value_string (testing_cfg, "test_mesh_small", 804 GNUNET_CONFIGURATION_get_value_string (testing_cfg, "test_mesh_small",
806 "data_output_file", 805 "data_output_file",
807 &data_filename)) 806 &data_filename))
808 { 807 {
809 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 808 data_file =
810 "Option test_mesh_small:data_output_file is required!\n");
811 return;
812 }
813
814 data_file =
815 GNUNET_DISK_file_open (data_filename, 809 GNUNET_DISK_file_open (data_filename,
816 GNUNET_DISK_OPEN_READWRITE | 810 GNUNET_DISK_OPEN_READWRITE |
817 GNUNET_DISK_OPEN_CREATE, 811 GNUNET_DISK_OPEN_CREATE,
818 GNUNET_DISK_PERM_USER_READ | 812 GNUNET_DISK_PERM_USER_READ |
819 GNUNET_DISK_PERM_USER_WRITE); 813 GNUNET_DISK_PERM_USER_WRITE);
820 if (data_file == NULL) 814 if (data_file == NULL)
821 { 815 {
822 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n", 816 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n",
823 data_filename); 817 data_filename);
824 GNUNET_free (data_filename); 818 GNUNET_free (data_filename);
819 }
825 } 820 }
826 821
827 wait_time = 822 wait_time =