GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
+ by the Free Software Foundation; either version 3, or (at your
option) any later version.
GNUnet is distributed in the hope that it will be useful, but
/**
* How long until we give up on transmitting the message?
*/
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 120)
#define MTYPE 12345
static void
connect_notify (void *cls,
- const struct GNUNET_PeerIdentity *peer)
+ const struct GNUNET_PeerIdentity *peer,
+ struct GNUNET_TIME_Relative latency,
+ uint32_t distance)
{
}
}
-static unsigned int
-bfc_callback (void *cls,
- const struct GNUNET_PeerIdentity *receiver,
- void *position,
- size_t padding)
-{
- return 0;
-}
-
-
static int
inbound_notify (void *cls,
const struct GNUNET_PeerIdentity *other,
- const struct GNUNET_MessageHeader *message)
+ const struct GNUNET_MessageHeader *message,
+ struct GNUNET_TIME_Relative latency,
+ uint32_t distance)
{
return GNUNET_OK;
}
static int
outbound_notify (void *cls,
const struct GNUNET_PeerIdentity *other,
- const struct GNUNET_MessageHeader *message)
+ const struct GNUNET_MessageHeader *message,
+ struct GNUNET_TIME_Relative latency,
+ uint32_t distance)
{
return GNUNET_OK;
}
p2.cfg,
TIMEOUT,
&p2,
- &init_notify,
+ &init_notify,
&connect_notify,
&disconnect_notify,
- &bfc_callback,
+ NULL,
&inbound_notify,
GNUNET_YES,
&outbound_notify, GNUNET_YES, handlers);
GNUNET_assert (cls == &p2);
GNUNET_CORE_disconnect (p1.ch);
GNUNET_CORE_disconnect (p2.ch);
- GNUNET_ARM_stop_service ("core", p1.cfg, sched, TIMEOUT, NULL, NULL);
- GNUNET_ARM_stop_service ("core", p2.cfg, sched, TIMEOUT, NULL, NULL);
-
ok = 0;
}
}
{
p->cfg = GNUNET_CONFIGURATION_create ();
#if START_ARM
- p->arm_pid = GNUNET_OS_start_process ("gnunet-service-arm",
+ p->arm_pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
"gnunet-service-arm",
#if VERBOSE
"-L", "DEBUG",
#endif
"-c", cfgname, NULL);
- sleep (1); /* allow ARM to start */
#endif
GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
- GNUNET_ARM_start_service ("core", p->cfg, sched, TIMEOUT, NULL, NULL);
}
TIMEOUT,
&p1,
&init_notify,
- &connect_notify,
+ &connect_notify,
&disconnect_notify,
- &bfc_callback,
+ NULL,
&inbound_notify,
GNUNET_YES, &outbound_notify, GNUNET_YES, handlers);
}
static int
check ()
{
- char *const argv[] = { "test-core-api",
+ char *const argv[] = { "test-core-api-start-only",
"-c",
"test_core_api_data.conf",
#if VERBOSE
ok = 1;
GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
- argv, "test-core-api", "nohelp", options, &run, &ok);
+ argv, "test-core-api-start-only", "nohelp", options, &run, &ok);
stop_arm (&p1);
stop_arm (&p2);
return ok;
{
int ret;
- GNUNET_log_setup ("test-core-api",
+ GNUNET_log_setup ("test-core-api-start-only",
#if VERBOSE
"DEBUG",
#else