static int
-get_identity (unsigned int offset, struct GNUNET_PeerIdentity *id)
+get_identity (unsigned int offset,
+ struct GNUNET_PeerIdentity *id)
{
struct GNUNET_CRYPTO_EddsaPrivateKey private_key;
GNUNET_memcpy (&private_key,
hostkeys_data + (offset * GNUNET_TESTING_HOSTKEYFILESIZE),
GNUNET_TESTING_HOSTKEYFILESIZE);
- GNUNET_CRYPTO_eddsa_key_get_public (&private_key, &id->public_key);
+ GNUNET_CRYPTO_eddsa_key_get_public (&private_key,
+ &id->public_key);
return GNUNET_OK;
}
enum OverlayConnectContextType type;
/**
- * The id of the second peer which is has to connect to the first peer
+ * The id of the second peer which has to connect to the first peer
*/
uint32_t other_peer_id;
};
other_peer_str);
GNUNET_free (other_peer_str);
lp2c->ohh =
- GNUNET_TRANSPORT_offer_hello (lp2c->tcc.cfg,
- occ->hello,
- &occ_hello_sent_cb,
- occ);
+ GNUNET_TRANSPORT_offer_hello (lp2c->tcc.cfg,
+ occ->hello,
+ &occ_hello_sent_cb,
+ occ);
if (NULL == lp2c->ohh)
{
GNUNET_break (0);
{
struct Peer *peer2;
+ /* HUH? Why to *obtain* HELLO? Seems we use this to *SEND* the
+ HELLO! */
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Connecting to transport of peer %s to obtain HELLO\n",
+ GNUNET_i2s (&occ->other_peer_identity));
GNUNET_assert (NULL == occ->emsg);
GNUNET_assert (NULL != occ->hello);
GNUNET_assert (NULL == occ->ghh);
{
printf ("\nAborting due to very high failure rate\n");
print_overlay_links_summary ();
- if (NULL != abort_task)
- GNUNET_SCHEDULER_cancel (abort_task);
- abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL);
+ GNUNET_SCHEDULER_shutdown ();
return;
}
}
event_mask = 0;
event_mask |= (1LL << GNUNET_TESTBED_ET_CONNECT);
event_mask |= (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED);
- GNUNET_TESTBED_run (hosts_file, cfg, num_peers, event_mask, controller_event_cb,
- NULL, &test_run, NULL);
+ GNUNET_TESTBED_run (hosts_file, cfg, num_peers, event_mask,
+ &controller_event_cb, NULL,
+ &test_run, NULL);
abort_task =
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &do_abort,
- NULL);
+ GNUNET_SCHEDULER_add_shutdown (&do_abort,
+ NULL);
}
const char *binaryHelp = "gnunet-testbed-profiler [OPTIONS]";
int ret;
+ unsetenv ("XDG_DATA_HOME");
+ unsetenv ("XDG_CONFIG_HOME");
if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
return 2;
result = GNUNET_SYSERR;