diff options
Diffstat (limited to 'src/namestore/test_namestore_api_zone_iteration_nick.c')
-rw-r--r-- | src/namestore/test_namestore_api_zone_iteration_nick.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_nick.c b/src/namestore/test_namestore_api_zone_iteration_nick.c index 5328e40a1..8a1b18cbf 100644 --- a/src/namestore/test_namestore_api_zone_iteration_nick.c +++ b/src/namestore/test_namestore_api_zone_iteration_nick.c | |||
@@ -60,6 +60,8 @@ static struct GNUNET_GNSRECORD_Data *s_rd_3; | |||
60 | 60 | ||
61 | static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | 61 | static struct GNUNET_NAMESTORE_QueueEntry *nsqe; |
62 | 62 | ||
63 | static char *directory; | ||
64 | |||
63 | /** | 65 | /** |
64 | * Re-establish the connection to the service. | 66 | * Re-establish the connection to the service. |
65 | * | 67 | * |
@@ -105,6 +107,11 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
105 | 107 | ||
106 | if (privkey2 != NULL) | 108 | if (privkey2 != NULL) |
107 | GNUNET_free (privkey2); | 109 | GNUNET_free (privkey2); |
110 | if (NULL != directory) | ||
111 | { | ||
112 | GNUNET_DISK_directory_remove (directory); | ||
113 | GNUNET_free (directory); | ||
114 | } | ||
108 | privkey2 = NULL; | 115 | privkey2 = NULL; |
109 | res = 1; | 116 | res = 1; |
110 | } | 117 | } |
@@ -153,6 +160,11 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
153 | if (nsh != NULL) | 160 | if (nsh != NULL) |
154 | GNUNET_NAMESTORE_disconnect (nsh); | 161 | GNUNET_NAMESTORE_disconnect (nsh); |
155 | nsh = NULL; | 162 | nsh = NULL; |
163 | if (NULL != directory) | ||
164 | { | ||
165 | GNUNET_DISK_directory_remove (directory); | ||
166 | GNUNET_free (directory); | ||
167 | } | ||
156 | } | 168 | } |
157 | 169 | ||
158 | static int | 170 | static int |
@@ -431,6 +443,9 @@ run (void *cls, | |||
431 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 443 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
432 | struct GNUNET_TESTING_Peer *peer) | 444 | struct GNUNET_TESTING_Peer *peer) |
433 | { | 445 | { |
446 | directory = NULL; | ||
447 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
448 | |||
434 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); | 449 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); |
435 | nsh = GNUNET_NAMESTORE_connect (cfg); | 450 | nsh = GNUNET_NAMESTORE_connect (cfg); |
436 | GNUNET_break (NULL != nsh); | 451 | GNUNET_break (NULL != nsh); |