}
+/**
+ * Obtain the host's hostname.
+ *
+ * @param host handle to the host, NULL means 'localhost'
+ * @return hostname of the host
+ */
+const char *
+GNUNET_TESTBED_host_get_hostname (const struct GNUNET_TESTBED_Host *host)
+{
+ return GNUNET_TESTBED_host_get_hostname_ (host);
+}
+
+
/**
* Obtain the host's username
*
int ret;
unsigned int offset;
unsigned int count;
-
+
GNUNET_assert (NULL != filename);
if (GNUNET_YES != GNUNET_DISK_file_test (filename))
LOG (GNUNET_ERROR_TYPE_WARNING, _("Hosts file %s not found\n"), filename);
return 0;
}
- if (GNUNET_OK !=
+ if (GNUNET_OK !=
GNUNET_DISK_file_size (filename, &fs, GNUNET_YES, GNUNET_YES))
fs = 0;
if (0 == fs)
LOG (GNUNET_ERROR_TYPE_WARNING, _("Hosts file %s has no data\n"), filename);
return 0;
}
- data = GNUNET_malloc (fs);
+ data = GNUNET_malloc (fs);
if (fs != GNUNET_DISK_fn_read (filename, data, fs))
{
GNUNET_free (data);
buf = &data[offset + 1];
}
else if ((data[offset] == '\n') || (data[offset] == '\0'))
- buf = &data[offset + 1];
+ buf = &data[offset + 1];
}
GNUNET_free (data);
if (NULL == starting_host)
- return 0;
+ return 0;
*hosts = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_Host *) * count);
memcpy (*hosts,
&host_list[GNUNET_TESTBED_host_get_id_ (starting_host)],
remote_args[argp++] = "NoHostAuthenticationForLocalhost=yes";
remote_args[argp++] = ssh_addr;
remote_args[argp++] = "which";
- remote_args[argp++] = "gnunet-helper-testbed";
+ remote_args[argp++] = "gnunet-helper-testbed";
remote_args[argp++] = NULL;
GNUNET_assert (argp == 11);
auxp =