diff options
Diffstat (limited to 'src/namestore/test_namestore_api_zone_iteration_specific_zone.c')
-rw-r--r-- | src/namestore/test_namestore_api_zone_iteration_specific_zone.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c index 6b131528e..bd4c5cc93 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |||
@@ -56,6 +56,7 @@ static char * s_name_3; | |||
56 | 56 | ||
57 | static struct GNUNET_GNSRECORD_Data *s_rd_3; | 57 | static struct GNUNET_GNSRECORD_Data *s_rd_3; |
58 | 58 | ||
59 | static char *directory; | ||
59 | 60 | ||
60 | /** | 61 | /** |
61 | * Re-establish the connection to the service. | 62 | * Re-establish the connection to the service. |
@@ -103,6 +104,12 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
103 | if (privkey2 != NULL) | 104 | if (privkey2 != NULL) |
104 | GNUNET_free (privkey2); | 105 | GNUNET_free (privkey2); |
105 | privkey2 = NULL; | 106 | privkey2 = NULL; |
107 | |||
108 | if (NULL != directory) | ||
109 | { | ||
110 | GNUNET_DISK_directory_remove (directory); | ||
111 | GNUNET_free (directory); | ||
112 | } | ||
106 | res = 1; | 113 | res = 1; |
107 | } | 114 | } |
108 | 115 | ||
@@ -151,6 +158,11 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
151 | if (nsh != NULL) | 158 | if (nsh != NULL) |
152 | GNUNET_NAMESTORE_disconnect (nsh); | 159 | GNUNET_NAMESTORE_disconnect (nsh); |
153 | nsh = NULL; | 160 | nsh = NULL; |
161 | if (NULL != directory) | ||
162 | { | ||
163 | GNUNET_DISK_directory_remove (directory); | ||
164 | GNUNET_free (directory); | ||
165 | } | ||
154 | } | 166 | } |
155 | 167 | ||
156 | 168 | ||
@@ -397,6 +409,9 @@ run (void *cls, | |||
397 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 409 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
398 | struct GNUNET_TESTING_Peer *peer) | 410 | struct GNUNET_TESTING_Peer *peer) |
399 | { | 411 | { |
412 | directory = NULL; | ||
413 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
414 | |||
400 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); | 415 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); |
401 | nsh = GNUNET_NAMESTORE_connect (cfg); | 416 | nsh = GNUNET_NAMESTORE_connect (cfg); |
402 | GNUNET_break (NULL != nsh); | 417 | GNUNET_break (NULL != nsh); |