- fix cli arg parse
[oweals/gnunet.git] / src / util / test_resolver_api.c
index bcbaf4f04a468e1467b4b1d46d3793c2fef7fa5e..acc3ae6aec876f29b8e3406c3161c0429e97bca6 100644 (file)
@@ -199,7 +199,9 @@ check_rootserver_name (void *cls, const char *hostname)
   else
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Received invalid rootserver hostname `%s'.\n", hostname);
+                "Received invalid rootserver hostname `%s', expected `%s'\n",
+                hostname,
+                ROOTSERVER_NAME);
     GNUNET_break (0);
   }
 }
@@ -292,11 +294,11 @@ run (void *cls, char *const *args, const char *cfgfile,
 
   rootserver =
       gethostbyaddr (&rootserver_addr, sizeof (rootserver_addr), AF_INET);
-  if (rootserver == NULL)
+  if (NULL == rootserver)
   {
     /* Error: resolving IP addresses does not work */
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                _("gethostbyaddr() could not lookup hostname: %s\n"),
+                "gethostbyaddr() could not lookup hostname: %s\n",
                 hstrerror (h_errno));
     GNUNET_break (0);
   }
@@ -365,7 +367,8 @@ main (int argc, char *argv[])
   fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver");
   proc = GNUNET_OS_start_process (GNUNET_YES,
                                  GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
-                                 NULL, NULL, fn,
+                                 NULL, NULL, NULL,
+                                  fn,
                                  "gnunet-service-resolver",
                                   "-c", "test_resolver_api_data.conf", NULL);
   GNUNET_assert (NULL != proc);
@@ -374,7 +377,7 @@ main (int argc, char *argv[])
                  GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1,
                                      argvx, "test-resolver-api", "nohelp",
                                      options, &run, &ok));
-  if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
+  if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG))
   {
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
     ok = 1;