* @param distance in overlay hops, as given by transport plugin
*/
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
if (peer == NULL)
return;
}
-static int
-check ()
+int
+main (int argcx, char *argvx[])
{
- char *const argv[] = { "test-gnunet-daemon-hostlist",
+ static char *const argv[] = {
+ "test-gnunet-daemon-hostlist",
"-c", "test_gnunet_daemon_hostlist_data.conf",
NULL
};
- struct GNUNET_GETOPT_CommandLineOption options[] = {
+ static struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
};
- ok = 1;
- GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
- "test-gnunet-daemon-hostlist", "nohelp", options, &run,
- &ok);
- return ok;
-}
-
-
-int
-main (int argc, char *argv[])
-{
-
- int ret;
GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-1");
GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2");
GNUNET_log_setup ("test-gnunet-daemon-hostlist",
"WARNING",
NULL);
- ret = check ();
- if (ret == 0)
+ ok = 1;
+ GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
+ "test-gnunet-daemon-hostlist", "nohelp", options, &run,
+ &ok);
+ if (0 == ok)
{
FPRINTF (stderr, "%s", ".");
/* now do it again */
- ret = check ();
+ ok = 1;
+ GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
+ "test-gnunet-daemon-hostlist", "nohelp", options, &run,
+ &ok);
FPRINTF (stderr, "%s", ".\n");
}
GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-1");
GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2");
GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-3");
- return ret;
+ return ok;
}
/* end of test_gnunet_daemon_hostlist_reconnect.c */