struct GNUNET_CONFIGURATION_Handle *cfg;
struct GNUNET_CORE_Handle *ch;
struct GNUNET_PeerIdentity id;
struct GNUNET_CONFIGURATION_Handle *cfg;
struct GNUNET_CORE_Handle *ch;
struct GNUNET_PeerIdentity id;
static void
init_notify (void *cls, struct GNUNET_CORE_Handle *server,
const struct GNUNET_PeerIdentity *my_identity)
static void
init_notify (void *cls, struct GNUNET_CORE_Handle *server,
const struct GNUNET_PeerIdentity *my_identity)
- GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify,
+ GNUNET_CORE_connect (p2.cfg, &p2, &init_notify, &connect_notify,
&disconnect_notify, &inbound_notify, GNUNET_YES,
&outbound_notify, GNUNET_YES, handlers);
}
&disconnect_notify, &inbound_notify, GNUNET_YES,
&outbound_notify, GNUNET_YES, handlers);
}
- GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm",
- "gnunet-service-arm",
-#if VERBOSE
- "-L", "DEBUG",
-#endif
- "-c", cfgname, NULL);
-#endif
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL,
+ binary,
+ "gnunet-service-arm",
+ "-c", cfgname, NULL);
static void
run (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
static void
run (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
- GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify,
+ GNUNET_CORE_connect (p1.cfg, &p1, &init_notify, &connect_notify,
&disconnect_notify, &inbound_notify, GNUNET_YES,
&outbound_notify, GNUNET_YES, handlers);
}
&disconnect_notify, &inbound_notify, GNUNET_YES,
&outbound_notify, GNUNET_YES, handlers);
}
stop_arm (struct PeerContext *p)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peer\n");
stop_arm (struct PeerContext *p)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peer\n");
if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK)
if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK)
char *const argv[] = { "test-core-api-start-only",
"-c",
"test_core_api_data.conf",
char *const argv[] = { "test-core-api-start-only",
"-c",
"test_core_api_data.conf",
int
main (int argc, char *argv[])
{
int ret;
GNUNET_log_setup ("test-core-api-start-only",
int
main (int argc, char *argv[])
{
int ret;
GNUNET_log_setup ("test-core-api-start-only",