- fix cli arg parse
[oweals/gnunet.git] / src / util / test_resolver_api.c
index 220f4bdac3ce5056bd4905344b9ea347283f8a8b..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);