stuff
[oweals/gnunet.git] / src / transport / test_transport_api_unreliability.c
index 8631fc3472ffe9b5ec87ac23f7aa50dffc5e9001..e7cb00274aa642fb1fb665b5a409e7fd95a0b010 100644 (file)
@@ -587,12 +587,18 @@ notify_connect (void *cls,
 static void
 setup_peer (struct PeerContext *p, const char *cfgname)
 {
+  memset (p, 0, sizeof (*p));
   p->cfg = GNUNET_CONFIGURATION_create ();
 
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
   if (GNUNET_CONFIGURATION_have_value (p->cfg,"PATHS", "SERVICEHOME"))
-      GNUNET_CONFIGURATION_get_value_string (p->cfg, "PATHS", "SERVICEHOME", &p->servicehome);
-  GNUNET_DISK_directory_remove (p->servicehome);
+    {
+      GNUNET_assert (GNUNET_OK ==
+                    GNUNET_CONFIGURATION_get_value_string (p->cfg,
+                                                           "PATHS", "SERVICEHOME", 
+                                                           &p->servicehome));
+      GNUNET_DISK_directory_remove (p->servicehome);
+    }
 
 
 #if START_ARM
@@ -870,15 +876,16 @@ check ()
     GNUNET_free(cert_file_p2);
   }
 
-  if ((p1.servicehome != NULL) && (p2.servicehome != NULL))
-  {
-    GNUNET_DISK_directory_remove (p1.servicehome);
-    GNUNET_DISK_directory_remove (p2.servicehome);
-    GNUNET_free(p1.servicehome);
-    GNUNET_free(p2.servicehome);
-  }
-  return ok;
-
+  if (p1.servicehome != NULL) 
+    {
+      GNUNET_DISK_directory_remove (p1.servicehome);
+      GNUNET_free(p1.servicehome);
+    }
+  if (p2.servicehome != NULL)
+    {
+      GNUNET_DISK_directory_remove (p2.servicehome); 
+      GNUNET_free(p2.servicehome);
+    }
   return ok;
 }
 
@@ -887,9 +894,6 @@ int
 main (int argc, char *argv[])
 {
   int ret;
-#ifdef MINGW
-  return GNUNET_SYSERR;
-#endif
 
   test_failed = GNUNET_NO;