-no boolean
authorChristian Grothoff <christian@grothoff.org>
Mon, 15 Apr 2013 15:00:53 +0000 (15:00 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 15 Apr 2013 15:00:53 +0000 (15:00 +0000)
13 files changed:
contrib/timeout_watchdog_w32.c
src/dns/gnunet-service-dns.c
src/exit/gnunet-daemon-exit.c
src/gns/test_gns_proxy.c
src/nat/nat.c
src/nat/nat_auto.c
src/nat/nat_mini.c
src/nat/test_nat_test.c
src/pt/test_gns_vpn.c
src/pt/test_gnunet_vpn.c
src/transport/plugin_transport_wlan.c
src/util/os_priority.c
src/vpn/gnunet-service-vpn.c

index 46a61575544341403e41ca0a9a424efa942aeb9d..63082fa02af5ad55ff11217400432439328eff36 100644 (file)
@@ -150,7 +150,7 @@ main (int argc, char *argv[])
   memset (&start, 0, sizeof (start));
   start.cb = sizeof (start);
 
-  if (!CreateProcessW (wpath, wcmd, NULL, NULL, TRUE, CREATE_SUSPENDED,
+  if (!CreateProcessW (wpath, wcmd, NULL, NULL, GNUNET_YES, CREATE_SUSPENDED,
        NULL, NULL, &start, &proc))
   {
     wprintf (L"Failed to get spawn process `%s' with arguments `%s': %lu\n", wpath, wcmd, GetLastError ());
index a2d5354de8b0493f644d0342519605d1d50a89c8..b7ecee0d78abd00c2b48ecc99a2a81b60cd8b861 100644 (file)
@@ -1043,7 +1043,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
   cfg = cfg_;
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-dns");
   if (GNUNET_YES !=
-      GNUNET_OS_check_helper_binary (binary, TRUE, NULL))
+      GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                _("`%s' must be installed SUID, refusing to run\n"),
index 2c5bb1ecd6760306d4f1685ab57290ed87ddb6ac..20f240b0d3f52ee9444539775f9a32cd3b894342 100644 (file)
@@ -3344,7 +3344,7 @@ run (void *cls, char *const *args GNUNET_UNUSED,
   {
     binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-exit");
     if (GNUNET_YES !=
-       GNUNET_OS_check_helper_binary (binary, TRUE, NULL)) // FIXME: CF: add test-parameters
+       GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL)) // FIXME: CF: add test-parameters
     {
       GNUNET_free (binary);
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
index 68830ca7f7630243e4400f9a9d74b91169ef6138..3ec2bf95cc998fbaed96c23b140e66742100b577 100644 (file)
@@ -446,13 +446,13 @@ main (int argc, char *const *argv)
 {
   char *binary;
 
-  if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary ("gnunet-gns-proxy", FALSE, NULL))
+  if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary ("gnunet-gns-proxy", GNUNET_NO, NULL))
   {
     fprintf (stderr, "Proxy binary not in PATH... skipping!\n");
     return 0;
   }
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-dns");
-  if (GNUNET_YES != GNUNET_OS_check_helper_binary (binary, TRUE, NULL))
+  if (GNUNET_YES != GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL))
   {
     fprintf (stderr, "DNS helper binary has wrong permissions... skipping!\n");
     GNUNET_free (binary);
index fd9d5eaa0a949b738c74733abd1fe4ab7749637d..e1ec880280dbf10127b1503633626ae7678edfe3 100644 (file)
@@ -1171,7 +1171,7 @@ GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp,
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-nat-server");
   if ((h->behind_nat == GNUNET_YES) && (GNUNET_YES == h->enable_nat_server) &&
       (GNUNET_YES !=
-       GNUNET_OS_check_helper_binary (binary, TRUE, NULL))) // FIXME: CF: add test-parameters
+       GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL))) // FIXME: CF: add test-parameters
   {
     h->enable_nat_server = GNUNET_NO;
     LOG (GNUNET_ERROR_TYPE_WARNING,
@@ -1183,7 +1183,7 @@ GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp,
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-nat-client");
   if ((GNUNET_YES == h->enable_nat_client) &&
       (GNUNET_YES !=
-       GNUNET_OS_check_helper_binary (binary, TRUE, NULL))) // FIXME: CF: add test-parameters
+       GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL))) // FIXME: CF: add test-parameters
   {
     h->enable_nat_client = GNUNET_NO;
     LOG (GNUNET_ERROR_TYPE_WARNING,
index f382a9ac6409ea6290a719c0565a2fc37f888d60..edb2bb8417dd2865d7d7dd96da7e0e9174e48ed6 100644 (file)
@@ -392,7 +392,7 @@ test_upnpc (struct GNUNET_NAT_AutoHandle *ah)
 
   /* test if upnpc is available */
   have_upnpc = (GNUNET_SYSERR !=
-               GNUNET_OS_check_helper_binary ("upnpc", FALSE, NULL));
+               GNUNET_OS_check_helper_binary ("upnpc", GNUNET_NO, NULL));
   /* FIXME: test if upnpc is actually working, that is, if transports
      start to work once we use UPnP */
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -426,7 +426,7 @@ test_icmp_server (struct GNUNET_NAT_AutoHandle *ah)
        (GNUNET_YES ==
         GNUNET_CONFIGURATION_get_value_yesno (ah->cfg, "nat", "BEHIND_NAT")) &&
        (GNUNET_YES ==
-        GNUNET_OS_check_helper_binary (binary, TRUE, NULL))); // FIXME: CF: add test-parameters
+        GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL))); // FIXME: CF: add test-parameters
   GNUNET_free_non_null (tmp);
   GNUNET_free (binary);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -461,7 +461,7 @@ test_icmp_client (struct GNUNET_NAT_AutoHandle *ah)
        (GNUNET_YES !=
         GNUNET_CONFIGURATION_get_value_yesno (ah->cfg, "nat", "BEHIND_NAT")) &&
        (GNUNET_YES ==
-        GNUNET_OS_check_helper_binary (binary, TRUE, NULL))); // FIXME: CF: add test-parameters
+        GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL))); // FIXME: CF: add test-parameters
   GNUNET_free_non_null (tmp);
   GNUNET_free (binary);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
index 29b26ee280645d8861fd8cea8a783152073faebc..dd1aede5e137f28641a743d332232965eb0f9bcf 100644 (file)
@@ -164,7 +164,7 @@ GNUNET_NAT_mini_get_external_ipv4 (struct GNUNET_TIME_Relative timeout,
 {
   struct GNUNET_NAT_ExternalHandle *eh;
 
-  if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary ("external-ip", FALSE, NULL))
+  if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary ("external-ip", GNUNET_NO, NULL))
   {
     LOG (GNUNET_ERROR_TYPE_INFO,
         _("`external-ip' command not found\n"));
@@ -499,7 +499,7 @@ GNUNET_NAT_mini_map_start (uint16_t port, int is_tcp,
   struct GNUNET_NAT_MiniHandle *ret;
   char pstr[6];
 
-  if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary ("upnpc", FALSE, NULL))
+  if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary ("upnpc", GNUNET_NO, NULL))
   {
     LOG (GNUNET_ERROR_TYPE_INFO,
         _("`upnpc' command not found\n"));
index 7d4964b5c3baf343009b82721e7aa4eda1f85966..41d3a2f09bb3be55de0d56aaba15ae2f8ff3031a 100644 (file)
@@ -92,7 +92,7 @@ main (int argc, char *const argv[])
                     "WARNING",
                     NULL);
 
-  nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server", FALSE, NULL);
+  nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server", GNUNET_NO, NULL);
   if (GNUNET_SYSERR == nat_res)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
index 0ae875d0f3c4e857f738963ac84d2f33be6f1428..b1d25dd85af67825be038305bb73ead762151295 100644 (file)
@@ -543,11 +543,11 @@ main (int argc, char *const *argv)
   bin_dns = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-dns");
   if ( (0 != geteuid ()) &&
        ( (GNUNET_YES !=
-         GNUNET_OS_check_helper_binary (bin_vpn, TRUE, NULL)) ||
+         GNUNET_OS_check_helper_binary (bin_vpn, GNUNET_YES, NULL)) ||
         (GNUNET_YES !=
-         GNUNET_OS_check_helper_binary (bin_exit, TRUE, NULL)) ||
+         GNUNET_OS_check_helper_binary (bin_exit, GNUNET_YES, NULL)) ||
         (GNUNET_YES !=
-         GNUNET_OS_check_helper_binary (bin_dns, TRUE, NULL))) )
+         GNUNET_OS_check_helper_binary (bin_dns, GNUNET_YES, NULL))) )
   {    
     fprintf (stderr,
             "WARNING: gnunet-helper-{exit,vpn,dns} binaries in $PATH are not SUID, refusing to run test (as it would have to fail).\n");
index b6e8980c9de0efe27876ad82010c2fbb01971526..52899d190f42b8784d33de09fee6863bbab4274c 100644 (file)
@@ -414,8 +414,8 @@ main (int argc, char *const *argv)
   exit_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-exit.exe");\r
   fprintf (stderr,"%s\n", vpn_binary);\r
   fprintf (stderr,"%s\n", exit_binary);\r
-  if ((GNUNET_YES != (ret = GNUNET_OS_check_helper_binary (vpn_binary, TRUE, NULL))) || // FIXME: CF: add test-parameters\r
-      (GNUNET_YES != (ret = GNUNET_OS_check_helper_binary (exit_binary, TRUE, NULL)))) // FIXME: CF: add test-parameters\r
+  if ((GNUNET_YES != (ret = GNUNET_OS_check_helper_binary (vpn_binary, GNUNET_YES, NULL))) || // FIXME: CF: add test-parameters\r
+      (GNUNET_YES != (ret = GNUNET_OS_check_helper_binary (exit_binary, GNUNET_YES, NULL)))) // FIXME: CF: add test-parameters\r
   {\r
     GNUNET_free (vpn_binary);\r
     GNUNET_free (exit_binary);\r
index 29070560e875c5dc5a496b7c755eeb1775883316..223791e18ff53c7dc4545485587f1f41460570ac 100644 (file)
@@ -1739,7 +1739,7 @@ libgnunet_plugin_transport_wlan_init (void *cls)
   }
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-transport-wlan");
   if ( (0 == testmode) &&
-       (GNUNET_YES != GNUNET_OS_check_helper_binary (binary, TRUE, NULL)) )
+       (GNUNET_YES != GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL)) )
   {
     LOG (GNUNET_ERROR_TYPE_ERROR,
         _("Helper binary `%s' not SUID, cannot run WLAN transport\n"),
index e86de968aa50b0163d22cf6a5a3d49e27704419d..e0e1614f4ff1953e46a476988a6679c1fb8128d9 100644 (file)
@@ -634,7 +634,7 @@ start_process (int pipe_control,
   int fd_stdin_read;
   int fd_stdin_write;
 
-  if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary (filename, FALSE, NULL))
+  if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary (filename, GNUNET_NO, NULL))
     return NULL; /* not executable */
   if (GNUNET_YES == pipe_control)
   {
@@ -865,7 +865,7 @@ start_process (int pipe_control,
   BOOL bresult;
   DWORD error_code;
 
-  if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary (filename, FALSE, NULL))
+  if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary (filename, GNUNET_NO, NULL))
     return NULL; /* not executable */
  
   /* Search in prefix dir (hopefully - the directory from which
@@ -1162,7 +1162,7 @@ start_process (int pipe_control,
     return NULL;
   }
 
-  bresult = CreateProcessW (wpath, wcmd, NULL, NULL, TRUE,
+  bresult = CreateProcessW (wpath, wcmd, NULL, NULL, GNUNET_YES,
        DETACHED_PROCESS | CREATE_SUSPENDED, env_block, NULL, &start, &proc);
   error_code = GetLastError ();
 
index e3bc8a49cae1f2e99688f9e1c62102e5a62cae10..a7a1ca213d4c41666ef1133abfc02dfeab3d59b7 100644 (file)
@@ -3062,7 +3062,7 @@ run (void *cls,
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn");
 
   if (GNUNET_YES !=
-      GNUNET_OS_check_helper_binary (binary, TRUE, NULL)) // FIXME: CF: add test-parameters
+      GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL)) // FIXME: CF: add test-parameters
   {
     fprintf (stderr,
             "`%s' is not SUID, refusing to run.\n",