aboutsummaryrefslogtreecommitdiff
path: root/src/cadet
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-10-02 03:37:26 +0000
committerBart Polot <bart@net.in.tum.de>2015-10-02 03:37:26 +0000
commit842b97a0c63763d22b372cc28f561fdf6cdd86a2 (patch)
treec1813a85cd7d694f2becabbae2ec8096d1cc5fa2 /src/cadet
parent2d1efbbea3f1ef04223f194ab990c7c1ab2176b1 (diff)
downloadgnunet-842b97a0c63763d22b372cc28f561fdf6cdd86a2.tar.gz
gnunet-842b97a0c63763d22b372cc28f561fdf6cdd86a2.zip
- style, change rounds
Diffstat (limited to 'src/cadet')
-rw-r--r--src/cadet/gnunet-cadet-profiler.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cadet/gnunet-cadet-profiler.c b/src/cadet/gnunet-cadet-profiler.c
index 46b7bfc94..7128d9d7c 100644
--- a/src/cadet/gnunet-cadet-profiler.c
+++ b/src/cadet/gnunet-cadet-profiler.c
@@ -36,7 +36,7 @@
36/** 36/**
37 * Paximum ping period in milliseconds. Real period = rand (0, PING_PERIOD) 37 * Paximum ping period in milliseconds. Real period = rand (0, PING_PERIOD)
38 */ 38 */
39#define PING_PERIOD 1000 39#define PING_PERIOD 500
40 40
41/** 41/**
42 * How long until we give up on connecting the peers? 42 * How long until we give up on connecting the peers?
@@ -56,7 +56,7 @@
56/** 56/**
57 * Ratio of peers active. First round always is 1.0. 57 * Ratio of peers active. First round always is 1.0.
58 */ 58 */
59static float rounds[] = {0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.0}; 59static float rounds[] = {0.8, 0.6, 0.8, 0.5, 0.3, 0.8, 0.0};
60 60
61/** 61/**
62 * Message type for pings. 62 * Message type for pings.
@@ -617,7 +617,7 @@ ping (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
617 617
618 peer->ping_task = NULL; 618 peer->ping_task = NULL;
619 619
620 if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0 620 if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)
621 || GNUNET_YES == test_finished) 621 || GNUNET_YES == test_finished)
622 return; 622 return;
623 623
@@ -625,9 +625,9 @@ ping (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
625 get_index (peer), get_index (peer->dest), peer->data_sent); 625 get_index (peer), get_index (peer->dest), peer->data_sent);
626 626
627 GNUNET_CADET_notify_transmit_ready (peer->ch, GNUNET_NO, 627 GNUNET_CADET_notify_transmit_ready (peer->ch, GNUNET_NO,
628 GNUNET_TIME_UNIT_FOREVER_REL, 628 GNUNET_TIME_UNIT_FOREVER_REL,
629 sizeof (struct CadetPingMessage), 629 sizeof (struct CadetPingMessage),
630 &tmt_rdy_ping, peer); 630 &tmt_rdy_ping, peer);
631} 631}
632 632
633/** 633/**
@@ -884,8 +884,8 @@ start_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
884 { 884 {
885 peers[i].dest = select_random_peer (&peers[i]); 885 peers[i].dest = select_random_peer (&peers[i]);
886 peers[i].ch = GNUNET_CADET_channel_create (peers[i].cadet, NULL, 886 peers[i].ch = GNUNET_CADET_channel_create (peers[i].cadet, NULL,
887 &peers[i].dest->id, 887 &peers[i].dest->id,
888 1, flags); 888 1, flags);
889 if (NULL == peers[i].ch) 889 if (NULL == peers[i].ch)
890 { 890 {
891 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Channel %lu failed\n", i); 891 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Channel %lu failed\n", i);