/*
This file is part of GNUnet.
- (C) 2011 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2011 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
* @file cadet/gnunet-cadet-profiler.c
/**
* Paximum ping period in milliseconds. Real period = rand (0, PING_PERIOD)
*/
-#define PING_PERIOD 1000
+#define PING_PERIOD 500
/**
* How long until we give up on connecting the peers?
/**
* Ratio of peers active. First round always is 1.0.
*/
-static float rounds[] = {0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.0};
+static float rounds[] = {0.8, 0.6, 0.8, 0.5, 0.3, 0.8, 0.0};
/**
* Message type for pings.
peer->ping_task = NULL;
- if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0
+ if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)
|| GNUNET_YES == test_finished)
return;
get_index (peer), get_index (peer->dest), peer->data_sent);
GNUNET_CADET_notify_transmit_ready (peer->ch, GNUNET_NO,
- GNUNET_TIME_UNIT_FOREVER_REL,
- sizeof (struct CadetPingMessage),
- &tmt_rdy_ping, peer);
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ sizeof (struct CadetPingMessage),
+ &tmt_rdy_ping, peer);
}
/**
{
peers[i].dest = select_random_peer (&peers[i]);
peers[i].ch = GNUNET_CADET_channel_create (peers[i].cadet, NULL,
- &peers[i].dest->id,
- 1, flags);
+ &peers[i].dest->id,
+ 1, flags);
if (NULL == peers[i].ch)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Channel %lu failed\n", i);