-fixing #2309
[oweals/gnunet.git] / src / nat / test_nat_test.c
index b8db301aa12bae3e50e3985a438b170bd1ce140a..64617880aae5dbe4529f6a287b12003d5a37da7a 100644 (file)
@@ -85,6 +85,8 @@ main (int argc, char *const argv[])
   };
   struct GNUNET_OS_Process *gns;
 
+  int nat_res;
+
   char *const argv_prog[] = {
     "test-nat-test",
     "-c",
@@ -105,8 +107,18 @@ main (int argc, char *const argv[])
                     "WARNING",
 #endif
                     NULL);
+
+  nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
+  if (GNUNET_SYSERR == nat_res)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                "Cannot run NAT test: `%s' file not found\n",
+                "gnunet-nat-server");
+    return 0;
+  }
+
   gns =
-      GNUNET_OS_start_process (NULL, NULL, "gnunet-nat-server",
+      GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-nat-server",
                                "gnunet-nat-server",
 #if VERBOSE
                                "-L", "DEBUG",