summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSupriti Singh <supritisingh08@gmail.com>2014-08-24 22:36:01 +0000
committerSupriti Singh <supritisingh08@gmail.com>2014-08-24 22:36:01 +0000
commit9894aa789be33fee93af458646ce8ee143abfd75 (patch)
tree6dd1d7aaa076de163ff649f6926301c43e6b1f97 /src
parent4e042c2ff9035c96c1e1edf83100c2dc6863fa17 (diff)
Changing delay_put and delay_get
Diffstat (limited to 'src')
-rw-r--r--src/dht/gnunet_dht_profiler.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/dht/gnunet_dht_profiler.c b/src/dht/gnunet_dht_profiler.c
index 12fa7be4d..0dca21f2c 100644
--- a/src/dht/gnunet_dht_profiler.c
+++ b/src/dht/gnunet_dht_profiler.c
@@ -741,20 +741,22 @@ dht_connected (void *cls,
{
case MODE_PUT:
{
- delay_put.rel_value_us =
+ struct GNUNET_TIME_Relative peer_delay_put;
+ peer_delay_put.rel_value_us =
delay_put.rel_value_us +
GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
delay_put.rel_value_us);
- ac->delay_task = GNUNET_SCHEDULER_add_delayed (delay_put, &delayed_put, ac);
+ ac->delay_task = GNUNET_SCHEDULER_add_delayed (peer_delay_put, &delayed_put, ac);
break;
}
case MODE_GET:
{
- delay_get.rel_value_us =
+ struct GNUNET_TIME_Relative peer_delay_get;
+ peer_delay_get.rel_value_us =
delay_get.rel_value_us +
GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
delay_get.rel_value_us);
- ac->delay_task = GNUNET_SCHEDULER_add_delayed (delay_get, &delayed_get, ac);
+ ac->delay_task = GNUNET_SCHEDULER_add_delayed (peer_delay_get, &delayed_get, ac);
break;
}
}
@@ -1268,8 +1270,8 @@ main (int argc, char *const *argv)
return 2;
/* set default delays */
delay_stats = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 1);
- delay_put = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1);
- delay_get = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 1);
+ delay_put = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 10);
+ delay_get = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 10);
timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5);
replication = 1; /* default replication */
rc = 0;