static int ok;
-static struct GNUNET_SCHEDULER_Handle *sched;
-
static GNUNET_SCHEDULER_TaskIdentifier timeout_task;
struct PeerContext
GNUNET_TRANSPORT_disconnect (p2.th);
p2.th = NULL;
}
- GNUNET_SCHEDULER_shutdown (sched);
+ GNUNET_SCHEDULER_shutdown ();
}
/**
static void
notify_connect (void *cls,
const struct GNUNET_PeerIdentity * peer,
- struct GNUNET_TIME_Relative latency,
- unsigned int distance)
+ const struct GNUNET_TRANSPORT_ATS_Information *ats, uint32_t ats_count)
{
if (peer == NULL)
return;
ok = 0;
if (timeout_task != GNUNET_SCHEDULER_NO_TASK)
{
- GNUNET_SCHEDULER_cancel (sched,
- timeout_task);
+ GNUNET_SCHEDULER_cancel (timeout_task);
timeout_task = GNUNET_SCHEDULER_NO_TASK;
}
- GNUNET_SCHEDULER_add_now (sched,
- &clean_up, NULL);
+ GNUNET_SCHEDULER_add_now (&clean_up, NULL);
}
"-c", cfgname, NULL);
#endif
GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
- p->th = GNUNET_TRANSPORT_connect (sched, p->cfg, NULL, p, NULL,
+ p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL,
¬ify_connect, NULL);
GNUNET_assert (p->th != NULL);
GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p);
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Asking ARM to stop core service\n");
- GNUNET_SCHEDULER_add_delayed (sched,
- GNUNET_TIME_UNIT_SECONDS,
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
&waitpid_task, p);
}
static void
run (void *cls,
- struct GNUNET_SCHEDULER_Handle *s,
char *const *args,
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
GNUNET_assert (ok == 1);
ok++;
- sched = s;
- timeout_task = GNUNET_SCHEDULER_add_delayed (sched,
- TIMEOUT,
+ timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
&timeout_error,
NULL);
- GNUNET_SCHEDULER_add_delayed (sched,
- GNUNET_TIME_UNIT_FOREVER_REL,
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
&shutdown_task,
NULL);
setup_peer (&p1, "test_gnunet_daemon_hostlist_peer1.conf");
int ret;
- GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-hostlist-peer-1");
- GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-hostlist-peer-2");
+ 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");
GNUNET_log_setup ("test-gnunet-daemon-hostlist",
#if VERBOSE
"DEBUG",
#endif
NULL);
ret = check ();
- GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-hostlist-peer-1");
- GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-hostlist-peer-2");
+ 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");
return ret;
}