diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-23 13:35:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-23 13:35:03 +0000 |
commit | 458cb34da45e855162c96fc4735f168e36a323c9 (patch) | |
tree | 092435daf6fb14609d4f1441858c5f9eda714640 /src/mesh/test_mesh_small_unicast_far.c | |
parent | bcad355380c32637dd47feec84c23faed30e0eea (diff) | |
download | gnunet-458cb34da45e855162c96fc4735f168e36a323c9.tar.gz gnunet-458cb34da45e855162c96fc4735f168e36a323c9.zip |
make writing data_output optional and disable by default
Diffstat (limited to 'src/mesh/test_mesh_small_unicast_far.c')
-rw-r--r-- | src/mesh/test_mesh_small_unicast_far.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/mesh/test_mesh_small_unicast_far.c b/src/mesh/test_mesh_small_unicast_far.c index d5a768f98..f5bab6fb4 100644 --- a/src/mesh/test_mesh_small_unicast_far.c +++ b/src/mesh/test_mesh_small_unicast_far.c | |||
@@ -120,8 +120,6 @@ static GNUNET_SCHEDULER_TaskIdentifier shutdown_handle; | |||
120 | 120 | ||
121 | static char *topology_file; | 121 | static char *topology_file; |
122 | 122 | ||
123 | static char *data_filename; | ||
124 | |||
125 | static struct GNUNET_TESTING_Daemon *d1; | 123 | static struct GNUNET_TESTING_Daemon *d1; |
126 | 124 | ||
127 | static struct GNUNET_TESTING_Daemon *d2; | 125 | static struct GNUNET_TESTING_Daemon *d2; |
@@ -460,6 +458,8 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
460 | char *temp_str; | 458 | char *temp_str; |
461 | unsigned long long temp_wait; | 459 | unsigned long long temp_wait; |
462 | struct GNUNET_TESTING_Host *hosts; | 460 | struct GNUNET_TESTING_Host *hosts; |
461 | char *data_filename; | ||
462 | |||
463 | 463 | ||
464 | ok = 1; | 464 | ok = 1; |
465 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); | 465 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); |
@@ -516,27 +516,23 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
516 | return; | 516 | return; |
517 | } | 517 | } |
518 | 518 | ||
519 | if (GNUNET_OK != | 519 | if (GNUNET_OK == |
520 | GNUNET_CONFIGURATION_get_value_string (testing_cfg, "test_mesh_small", | 520 | GNUNET_CONFIGURATION_get_value_string (testing_cfg, "test_mesh_small", |
521 | "data_output_file", | 521 | "data_output_file", |
522 | &data_filename)) | 522 | &data_filename)) |
523 | { | 523 | { |
524 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 524 | data_file = |
525 | "Option test_mesh_small:data_output_file is required!\n"); | ||
526 | return; | ||
527 | } | ||
528 | |||
529 | data_file = | ||
530 | GNUNET_DISK_file_open (data_filename, | 525 | GNUNET_DISK_file_open (data_filename, |
531 | GNUNET_DISK_OPEN_READWRITE | | 526 | GNUNET_DISK_OPEN_READWRITE | |
532 | GNUNET_DISK_OPEN_CREATE, | 527 | GNUNET_DISK_OPEN_CREATE, |
533 | GNUNET_DISK_PERM_USER_READ | | 528 | GNUNET_DISK_PERM_USER_READ | |
534 | GNUNET_DISK_PERM_USER_WRITE); | 529 | GNUNET_DISK_PERM_USER_WRITE); |
535 | if (data_file == NULL) | 530 | if (data_file == NULL) |
536 | { | 531 | { |
537 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n", | 532 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n", |
538 | data_filename); | 533 | data_filename); |
539 | GNUNET_free (data_filename); | 534 | GNUNET_free (data_filename); |
535 | } | ||
540 | } | 536 | } |
541 | 537 | ||
542 | wait_time = | 538 | wait_time = |