static int is_https;
+static int is_multi_protocol;
+
static GNUNET_SCHEDULER_TaskIdentifier die_task;
static char * key_file_p1;
notify_receive (void *cls,
const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_MessageHeader *message,
- struct GNUNET_TIME_Relative latency,
- uint32_t distance)
+ const struct GNUNET_TRANSPORT_ATS_Information *ats, uint32_t ats_count)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ok is (%d)!\n",
ok);
static void
notify_connect (void *cls,
const struct GNUNET_PeerIdentity *peer,
- struct GNUNET_TIME_Relative latency,
- uint32_t distance)
+ const struct GNUNET_TRANSPORT_ATS_Information *ats, uint32_t ats_count)
{
if (cls == &p1)
{
die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
&end_badly, NULL);
+ if (is_multi_protocol)
+ {
+ setup_peer (&p1, "test_transport_api_multi_peer1.conf");
+ setup_peer (&p2, "test_transport_api_multi_peer2.conf");
+ }
+
if (is_udp)
{
setup_peer (&p1, "test_transport_api_udp_peer1.conf");
{
is_http = GNUNET_YES;
}
+ else if (strstr(argv[0], "multi") != NULL)
+ {
+ is_multi_protocol = GNUNET_YES;
+ }
ret = check ();
- GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-peer-1");
- GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-peer-2");
+ if (is_multi_protocol)
+ {
+ GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-multi-peer-1/");
+ GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-multi-peer-2/");
+ }
+ else
+ {
+ GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-peer-1");
+ GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-peer-2");
+ }
return ret;
}