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/dht | |
parent | bcad355380c32637dd47feec84c23faed30e0eea (diff) | |
download | gnunet-458cb34da45e855162c96fc4735f168e36a323c9.tar.gz gnunet-458cb34da45e855162c96fc4735f168e36a323c9.zip |
make writing data_output optional and disable by default
Diffstat (limited to 'src/dht')
-rw-r--r-- | src/dht/test_dht_2dtorus.c | 23 | ||||
-rw-r--r-- | src/dht/test_dht_2dtorus.conf | 2 |
2 files changed, 10 insertions, 15 deletions
diff --git a/src/dht/test_dht_2dtorus.c b/src/dht/test_dht_2dtorus.c index cc2520580..1cc0e7980 100644 --- a/src/dht/test_dht_2dtorus.c +++ b/src/dht/test_dht_2dtorus.c | |||
@@ -103,8 +103,6 @@ static GNUNET_SCHEDULER_TaskIdentifier shutdown_handle; | |||
103 | 103 | ||
104 | static char *topology_file; | 104 | static char *topology_file; |
105 | 105 | ||
106 | static char *data_filename; | ||
107 | |||
108 | struct GNUNET_TESTING_Daemon *d1; | 106 | struct GNUNET_TESTING_Daemon *d1; |
109 | 107 | ||
110 | struct GNUNET_TESTING_Daemon *d2; | 108 | struct GNUNET_TESTING_Daemon *d2; |
@@ -472,6 +470,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
472 | { | 470 | { |
473 | char *temp_str; | 471 | char *temp_str; |
474 | struct GNUNET_TESTING_Host *hosts; | 472 | struct GNUNET_TESTING_Host *hosts; |
473 | char *data_filename; | ||
475 | 474 | ||
476 | ok = 1; | 475 | ok = 1; |
477 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); | 476 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); |
@@ -509,27 +508,23 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
509 | return; | 508 | return; |
510 | } | 509 | } |
511 | 510 | ||
512 | if (GNUNET_OK != | 511 | if (GNUNET_OK == |
513 | GNUNET_CONFIGURATION_get_value_string (testing_cfg, "test_dht_2dtorus", | 512 | GNUNET_CONFIGURATION_get_value_string (testing_cfg, "test_dht_2dtorus", |
514 | "data_output_file", | 513 | "data_output_file", |
515 | &data_filename)) | 514 | &data_filename)) |
516 | { | 515 | { |
517 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 516 | data_file = |
518 | "Option test_dht_2d:data_output_file is required!\n"); | ||
519 | return; | ||
520 | } | ||
521 | |||
522 | data_file = | ||
523 | GNUNET_DISK_file_open (data_filename, | 517 | GNUNET_DISK_file_open (data_filename, |
524 | GNUNET_DISK_OPEN_READWRITE | | 518 | GNUNET_DISK_OPEN_READWRITE | |
525 | GNUNET_DISK_OPEN_CREATE, | 519 | GNUNET_DISK_OPEN_CREATE, |
526 | GNUNET_DISK_PERM_USER_READ | | 520 | GNUNET_DISK_PERM_USER_READ | |
527 | GNUNET_DISK_PERM_USER_WRITE); | 521 | GNUNET_DISK_PERM_USER_WRITE); |
528 | if (data_file == NULL) | 522 | if (data_file == NULL) |
529 | { | 523 | { |
530 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n", | 524 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n", |
531 | data_filename); | 525 | data_filename); |
532 | GNUNET_free (data_filename); | 526 | GNUNET_free (data_filename); |
527 | } | ||
533 | } | 528 | } |
534 | 529 | ||
535 | if (GNUNET_YES == | 530 | if (GNUNET_YES == |
diff --git a/src/dht/test_dht_2dtorus.conf b/src/dht/test_dht_2dtorus.conf index e49810569..20ca30e3f 100644 --- a/src/dht/test_dht_2dtorus.conf +++ b/src/dht/test_dht_2dtorus.conf | |||
@@ -75,4 +75,4 @@ DELETE_FILES = YES | |||
75 | 75 | ||
76 | [test_dht_2dtorus] | 76 | [test_dht_2dtorus] |
77 | CONNECTION_LIMIT = 16 | 77 | CONNECTION_LIMIT = 16 |
78 | DATA_OUTPUT_FILE=data_output | 78 | #DATA_OUTPUT_FILE=data_output |