gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r31231 - gnunet/src/namestore


From: gnunet
Subject: [GNUnet-SVN] r31231 - gnunet/src/namestore
Date: Mon, 9 Dec 2013 18:53:31 +0100

Author: LRN
Date: 2013-12-09 18:53:31 +0100 (Mon, 09 Dec 2013)
New Revision: 31231

Modified:
   gnunet/src/namestore/test_namestore_api_lookup_nick.c
   gnunet/src/namestore/test_namestore_api_lookup_private.c
   gnunet/src/namestore/test_namestore_api_lookup_public.c
   gnunet/src/namestore/test_namestore_api_lookup_shadow.c
   gnunet/src/namestore/test_namestore_api_lookup_shadow_filter.c
   gnunet/src/namestore/test_namestore_api_monitoring.c
   gnunet/src/namestore/test_namestore_api_monitoring_existing.c
   gnunet/src/namestore/test_namestore_api_remove.c
   gnunet/src/namestore/test_namestore_api_remove_not_existing_record.c
   gnunet/src/namestore/test_namestore_api_store.c
   gnunet/src/namestore/test_namestore_api_store_update.c
   gnunet/src/namestore/test_namestore_api_zone_iteration.c
   gnunet/src/namestore/test_namestore_api_zone_iteration_nick.c
   gnunet/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
   gnunet/src/namestore/test_namestore_api_zone_iteration_stop.c
   gnunet/src/namestore/test_namestore_api_zone_to_name.c
Log:
Remove test home at the beginning and at the VERY end

Modified: gnunet/src/namestore/test_namestore_api_lookup_nick.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_lookup_nick.c       2013-12-09 
17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_lookup_nick.c       2013-12-09 
17:53:31 UTC (rev 31231)
@@ -68,11 +68,6 @@
     GNUNET_free (privkey);
     privkey = NULL;
   }
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   GNUNET_SCHEDULER_shutdown ();
 }
 
@@ -276,6 +271,7 @@
 
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
                                                &endbadly, NULL);
@@ -310,7 +306,14 @@
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_lookup_private.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_lookup_private.c    2013-12-09 
17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_lookup_private.c    2013-12-09 
17:53:31 UTC (rev 31231)
@@ -63,11 +63,6 @@
     GNUNET_free (privkey);
     privkey = NULL;
   }
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   GNUNET_SCHEDULER_shutdown ();
 }
 
@@ -179,6 +174,7 @@
 
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
                                                &endbadly, NULL);
@@ -222,7 +218,14 @@
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_lookup_public.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_lookup_public.c     2013-12-09 
17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_lookup_public.c     2013-12-09 
17:53:31 UTC (rev 31231)
@@ -71,11 +71,6 @@
     GNUNET_free (privkey);
     privkey = NULL;
   }
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   GNUNET_SCHEDULER_shutdown ();
 }
 
@@ -201,6 +196,7 @@
 
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
                                                &endbadly, NULL);
@@ -247,7 +243,14 @@
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_lookup_shadow.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_lookup_shadow.c     2013-12-09 
17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_lookup_shadow.c     2013-12-09 
17:53:31 UTC (rev 31231)
@@ -73,11 +73,6 @@
     GNUNET_free (privkey);
     privkey = NULL;
   }
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   GNUNET_SCHEDULER_shutdown ();
 }
 
@@ -233,6 +228,7 @@
 
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
                                                &endbadly, NULL);
@@ -277,7 +273,14 @@
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_lookup_shadow_filter.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_lookup_shadow_filter.c      
2013-12-09 17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_lookup_shadow_filter.c      
2013-12-09 17:53:31 UTC (rev 31231)
@@ -86,11 +86,6 @@
     GNUNET_free (privkey);
     privkey = NULL;
   }
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   GNUNET_SCHEDULER_shutdown ();
 }
 
@@ -300,6 +295,7 @@
 
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
                                                &endbadly, NULL);
@@ -354,7 +350,14 @@
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_monitoring.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_monitoring.c        2013-12-09 
17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_monitoring.c        2013-12-09 
17:53:31 UTC (rev 31231)
@@ -119,11 +119,6 @@
     GNUNET_free (privkey2);
     privkey2 = NULL;
   }
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
 }
 
 
@@ -277,6 +272,7 @@
 
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   GNUNET_asprintf(&hostkey_file,
                  "zonefiles%s%s",
@@ -357,7 +353,14 @@
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_monitoring_existing.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_monitoring_existing.c       
2013-12-09 17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_monitoring_existing.c       
2013-12-09 17:53:31 UTC (rev 31231)
@@ -120,11 +120,6 @@
     GNUNET_free (privkey2);
     privkey2 = NULL;
   }
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
 }
 
 
@@ -288,6 +283,7 @@
 
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(mycfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   res = 1;
 
@@ -355,7 +351,14 @@
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_remove.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_remove.c    2013-12-09 17:53:20 UTC 
(rev 31230)
+++ gnunet/src/namestore/test_namestore_api_remove.c    2013-12-09 17:53:31 UTC 
(rev 31231)
@@ -63,11 +63,6 @@
     GNUNET_free (privkey);
     privkey = NULL;
   }
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   GNUNET_SCHEDULER_shutdown ();
 }
 
@@ -161,6 +156,7 @@
 
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
                                                &endbadly, NULL);
@@ -205,7 +201,14 @@
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_remove_not_existing_record.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_remove_not_existing_record.c        
2013-12-09 17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_remove_not_existing_record.c        
2013-12-09 17:53:31 UTC (rev 31231)
@@ -61,11 +61,6 @@
     GNUNET_free (privkey);
     privkey = NULL;
   }
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   GNUNET_SCHEDULER_shutdown ();
 }
 
@@ -141,6 +136,7 @@
 
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
                                                &endbadly, NULL);
@@ -178,7 +174,14 @@
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_store.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_store.c     2013-12-09 17:53:20 UTC 
(rev 31230)
+++ gnunet/src/namestore/test_namestore_api_store.c     2013-12-09 17:53:31 UTC 
(rev 31231)
@@ -61,11 +61,6 @@
     GNUNET_free (privkey);
     privkey = NULL;
   }
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   GNUNET_SCHEDULER_shutdown ();
 }
 
@@ -125,6 +120,7 @@
 
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
                                                &endbadly, NULL);
@@ -169,7 +165,14 @@
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_store_update.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_store_update.c      2013-12-09 
17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_store_update.c      2013-12-09 
17:53:31 UTC (rev 31231)
@@ -83,11 +83,6 @@
     GNUNET_free (privkey);
     privkey = NULL;
   }
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   GNUNET_SCHEDULER_shutdown ();
 }
 
@@ -239,6 +234,7 @@
 
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   update_performed = GNUNET_NO;
   endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
@@ -280,14 +276,20 @@
 int
 main (int argc, char *argv[])
 {
-  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/");
   res = 1;
   if (0 !=
       GNUNET_TESTING_peer_run ("test-namestore-api-store-update",
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_zone_iteration.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_zone_iteration.c    2013-12-09 
17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_zone_iteration.c    2013-12-09 
17:53:31 UTC (rev 31231)
@@ -105,11 +105,6 @@
   if (privkey2 != NULL)
     GNUNET_free (privkey2);
   privkey2 = NULL;
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   res = 1;
 }
 
@@ -156,11 +151,6 @@
   }
   if (nsh != NULL)
     GNUNET_NAMESTORE_disconnect (nsh);
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   nsh = NULL;
 }
 
@@ -435,6 +425,7 @@
 {
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL);
   nsh = GNUNET_NAMESTORE_connect (cfg);
@@ -456,13 +447,19 @@
 main (int argc, char *argv[])
 {
   res = 1;
-  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore");
   if (0 !=
       GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration",
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_zone_iteration_nick.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_zone_iteration_nick.c       
2013-12-09 17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_zone_iteration_nick.c       
2013-12-09 17:53:31 UTC (rev 31231)
@@ -107,11 +107,6 @@
 
   if (privkey2 != NULL)
     GNUNET_free (privkey2);
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   privkey2 = NULL;
   res = 1;
 }
@@ -160,11 +155,6 @@
   if (nsh != NULL)
     GNUNET_NAMESTORE_disconnect (nsh);
   nsh = NULL;
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
 }
 
 static int
@@ -445,6 +435,7 @@
 {
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL);
   nsh = GNUNET_NAMESTORE_connect (cfg);
@@ -467,13 +458,19 @@
 main (int argc, char *argv[])
 {
   res = 1;
-  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore");
   if (0 !=
       GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration",
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_zone_iteration_specific_zone.c      
2013-12-09 17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_zone_iteration_specific_zone.c      
2013-12-09 17:53:31 UTC (rev 31231)
@@ -104,12 +104,6 @@
   if (privkey2 != NULL)
     GNUNET_free (privkey2);
   privkey2 = NULL;
-
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   res = 1;
 }
 
@@ -158,11 +152,6 @@
   if (nsh != NULL)
     GNUNET_NAMESTORE_disconnect (nsh);
   nsh = NULL;
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
 }
 
 
@@ -411,6 +400,7 @@
 {
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL);
   nsh = GNUNET_NAMESTORE_connect (cfg);
@@ -432,14 +422,20 @@
 int
 main (int argc, char *argv[])
 {
-  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/");
   res = 1;
   if (0 !=
       GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration",
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_zone_iteration_stop.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_zone_iteration_stop.c       
2013-12-09 17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_zone_iteration_stop.c       
2013-12-09 17:53:31 UTC (rev 31231)
@@ -105,12 +105,6 @@
   if (privkey2 != NULL)
     GNUNET_free (privkey2);
   privkey2 = NULL;
-
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   res = 1;
 }
 
@@ -441,6 +435,7 @@
 {
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL);
   nsh = GNUNET_NAMESTORE_connect (cfg);
@@ -461,14 +456,20 @@
 int
 main (int argc, char *argv[])
 {
-  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/");
   res = 1;
   if (0 !=
       GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration-stop",
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 

Modified: gnunet/src/namestore/test_namestore_api_zone_to_name.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_zone_to_name.c      2013-12-09 
17:53:20 UTC (rev 31230)
+++ gnunet/src/namestore/test_namestore_api_zone_to_name.c      2013-12-09 
17:53:31 UTC (rev 31231)
@@ -73,11 +73,6 @@
   nsh = NULL;
   if (privkey != NULL)
     GNUNET_free (privkey);
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   privkey = NULL;
   res = 1;
 }
@@ -96,11 +91,6 @@
   privkey = NULL;
   if (nsh != NULL)
     GNUNET_NAMESTORE_disconnect (nsh);
-  if (NULL != directory)
-  {
-      GNUNET_DISK_directory_remove (directory);
-      GNUNET_free (directory);
-  }
   nsh = NULL;
 }
 
@@ -180,6 +170,7 @@
 
   directory = NULL;
   GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", 
&directory);
+  GNUNET_DISK_directory_remove (directory);
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,endbadly, NULL);
   GNUNET_asprintf (&s_name, "dummy");
@@ -232,7 +223,14 @@
                                "test_namestore_api.conf",
                                &run,
                                NULL))
-    return 1;
+  {
+    res = 1;
+  }
+  if (NULL != directory)
+  {
+      GNUNET_DISK_directory_remove (directory);
+      GNUNET_free (directory);
+  }
   return res;
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]