static void
terminate_task_error (void *cls)
{
- const struct GNUNET_SCHEDULER_TaskContext *tc;
-
err_task = NULL;
- tc = GNUNET_SCHEDULER_get_task_context ();
- if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Testcase failed!\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Testcase failed!\n");
terminate_peer (&p1);
terminate_peer (&p2);
//GNUNET_break (0);
else
ok = 0; /* pass */
GNUNET_STATISTICS_get (p1.stats, "core", "# discarded CORE_SEND requests",
- GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p1);
+ NULL, &print_stat, &p1);
GNUNET_STATISTICS_get (p1.stats, "core",
"# discarded CORE_SEND request bytes",
- GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p1);
+ NULL, &print_stat, &p1);
GNUNET_STATISTICS_get (p1.stats, "core",
"# discarded lower priority CORE_SEND requests",
- GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, NULL);
+ NULL, &print_stat, NULL);
GNUNET_STATISTICS_get (p1.stats, "core",
"# discarded lower priority CORE_SEND request bytes",
- GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p1);
+ NULL, &print_stat, &p1);
GNUNET_STATISTICS_get (p2.stats, "core", "# discarded CORE_SEND requests",
- GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p2);
+ NULL, &print_stat, &p2);
GNUNET_STATISTICS_get (p2.stats, "core",
"# discarded CORE_SEND request bytes",
- GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p2);
+ NULL, &print_stat, &p2);
GNUNET_STATISTICS_get (p2.stats, "core",
"# discarded lower priority CORE_SEND requests",
- GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p2);
+ NULL, &print_stat, &p2);
GNUNET_STATISTICS_get (p2.stats, "core",
"# discarded lower priority CORE_SEND request bytes",
- GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p2);
+ NULL, &print_stat, &p2);
if (ok != 0)
kind = GNUNET_ERROR_TYPE_ERROR;
*/
GNUNET_SCHEDULER_cancel (err_task);
err_task = GNUNET_SCHEDULER_add_now (&terminate_task, NULL);
-
}
}
-
static void
connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Asking core (1) for transmission to peer `%4s'\n",
GNUNET_i2s (&p2.id));
- if (err_task != NULL)
- GNUNET_SCHEDULER_cancel (err_task);
+ GNUNET_SCHEDULER_cancel (err_task);
err_task =
GNUNET_SCHEDULER_add_delayed (TIMEOUT, &terminate_task_error, NULL);
start_time = GNUNET_TIME_absolute_get ();
static int
-inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
+inbound_notify (void *cls,
+ const struct GNUNET_PeerIdentity *other,
const struct GNUNET_MessageHeader *message)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Core provides inbound data from `%4s' %llu.\n",
- GNUNET_i2s (other), ntohs (message->size));
+ "Core provides inbound data from `%4s' %u.\n",
+ GNUNET_i2s (other),
+ (unsigned int) ntohs (message->size));
total_bytes_recv += ntohs (message->size);
return GNUNET_OK;
}
static int
-outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
+outbound_notify (void *cls,
+ const struct GNUNET_PeerIdentity *other,
const struct GNUNET_MessageHeader *message)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,