static struct PeerContext p2;
-static struct GNUNET_SCHEDULER_Handle *sched;
-
static int ok;
static int is_tcp;
{
unsigned long long delta;
- GNUNET_SCHEDULER_cancel (sched, die_task);
+ GNUNET_SCHEDULER_cancel (die_task);
die_task = GNUNET_SCHEDULER_NO_TASK;
#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from transports!\n");
n, s,
ntohs (message->size),
ntohl (hdr->num));
- GNUNET_SCHEDULER_cancel (sched, die_task);
- die_task = GNUNET_SCHEDULER_add_now (sched, &end_badly, NULL);
+ GNUNET_SCHEDULER_cancel (die_task);
+ die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL);
return;
}
if (ntohl (hdr->num) != n)
n, s,
ntohs (message->size),
ntohl (hdr->num));
- GNUNET_SCHEDULER_cancel (sched, die_task);
- die_task = GNUNET_SCHEDULER_add_now (sched, &end_badly, NULL);
+ GNUNET_SCHEDULER_cancel (die_task);
+ die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL);
return;
}
memset (cbuf, n, s - sizeof (struct TestMessage));
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Expected message %u with bits %u, but body did not match\n",
n, (unsigned char) n);
- GNUNET_SCHEDULER_cancel (sched, die_task);
- die_task = GNUNET_SCHEDULER_add_now (sched, &end_badly, NULL);
+ GNUNET_SCHEDULER_cancel (die_task);
+ die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL);
return;
}
#if VERBOSE
if (0 == (n % (TOTAL_MSGS/100)))
{
fprintf (stderr, ".");
- GNUNET_SCHEDULER_cancel (sched, die_task);
- die_task = GNUNET_SCHEDULER_add_delayed (sched,
- TIMEOUT,
+ GNUNET_SCHEDULER_cancel (die_task);
+ die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
&end_badly,
NULL);
}
}
}
- p->th = GNUNET_TRANSPORT_connect (sched, p->cfg, NULL,
+ p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL,
p,
¬ify_receive,
¬ify_connect,
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);
OKPP;
- sched = s;
- die_task = GNUNET_SCHEDULER_add_delayed (sched,
- TIMEOUT,
+ die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
&end_badly,
NULL);
if (is_tcp)