- next test
[oweals/gnunet.git] / src / gns / test_gns_proxy.c
index 35350e8bb64fe49c0333cb4862469d4f0df82bce..4cd0a371499ed96e16343b405081e2ef850ab308 100644 (file)
@@ -135,10 +135,19 @@ do_shutdown ()
   GNUNET_free_non_null (url);
 
   if (NULL != tmp_cfgfile)
-    remove (tmp_cfgfile);
-
+    {
+      if (0 != remove (tmp_cfgfile))
+       GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "remove", tmp_cfgfile);
+      GNUNET_free (tmp_cfgfile);
+      tmp_cfgfile = NULL;
+    }
   if (NULL != proxy_proc)
-    GNUNET_OS_process_kill (proxy_proc, 9);
+    {
+      (void) GNUNET_OS_process_kill (proxy_proc, SIGKILL);
+      GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (proxy_proc));
+      GNUNET_OS_process_destroy (proxy_proc);
+      proxy_proc = NULL;
+    }
   url = NULL;
 }
 
@@ -441,6 +450,12 @@ main (int argc, char *const *argv)
     return 0;
   }
 
+  if (GNUNET_YES != GNUNET_OS_check_helper_binary ("gnunet-helper-dns"))
+  {
+    fprintf (stderr, "DNS helper binary has wrong permissions... skipping!\n");
+    return 0;
+  }
+
   GNUNET_CRYPTO_setup_hostkey ("test_gns_proxy.conf");
   
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))