aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_zone_to_name.c
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-12-09 17:53:31 +0000
committerLRN <lrn1986@gmail.com>2013-12-09 17:53:31 +0000
commitcc57e1d42bbfee97247ad7ea1db3fa81ecbf2c08 (patch)
treea1239bef1cb83eed339459d24dad5e69f27c8aa1 /src/namestore/test_namestore_api_zone_to_name.c
parent2d828dcdcd023b9361b11491254d08f122c142b1 (diff)
downloadgnunet-cc57e1d42bbfee97247ad7ea1db3fa81ecbf2c08.tar.gz
gnunet-cc57e1d42bbfee97247ad7ea1db3fa81ecbf2c08.zip
Remove test home at the beginning and at the VERY end
Diffstat (limited to 'src/namestore/test_namestore_api_zone_to_name.c')
-rw-r--r--src/namestore/test_namestore_api_zone_to_name.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c
index 26593547b..9ade0cfc1 100644
--- a/src/namestore/test_namestore_api_zone_to_name.c
+++ b/src/namestore/test_namestore_api_zone_to_name.c
@@ -73,11 +73,6 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
73 nsh = NULL; 73 nsh = NULL;
74 if (privkey != NULL) 74 if (privkey != NULL)
75 GNUNET_free (privkey); 75 GNUNET_free (privkey);
76 if (NULL != directory)
77 {
78 GNUNET_DISK_directory_remove (directory);
79 GNUNET_free (directory);
80 }
81 privkey = NULL; 76 privkey = NULL;
82 res = 1; 77 res = 1;
83} 78}
@@ -96,11 +91,6 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
96 privkey = NULL; 91 privkey = NULL;
97 if (nsh != NULL) 92 if (nsh != NULL)
98 GNUNET_NAMESTORE_disconnect (nsh); 93 GNUNET_NAMESTORE_disconnect (nsh);
99 if (NULL != directory)
100 {
101 GNUNET_DISK_directory_remove (directory);
102 GNUNET_free (directory);
103 }
104 nsh = NULL; 94 nsh = NULL;
105} 95}
106 96
@@ -180,6 +170,7 @@ run (void *cls,
180 170
181 directory = NULL; 171 directory = NULL;
182 GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); 172 GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory);
173 GNUNET_DISK_directory_remove (directory);
183 174
184 endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,endbadly, NULL); 175 endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,endbadly, NULL);
185 GNUNET_asprintf (&s_name, "dummy"); 176 GNUNET_asprintf (&s_name, "dummy");
@@ -232,7 +223,14 @@ main (int argc, char *argv[])
232 "test_namestore_api.conf", 223 "test_namestore_api.conf",
233 &run, 224 &run,
234 NULL)) 225 NULL))
235 return 1; 226 {
227 res = 1;
228 }
229 if (NULL != directory)
230 {
231 GNUNET_DISK_directory_remove (directory);
232 GNUNET_free (directory);
233 }
236 return res; 234 return res;
237} 235}
238 236