aboutsummaryrefslogtreecommitdiff
path: root/src/rps
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2015-01-08 00:32:29 +0000
committerJulius Bünger <buenger@mytum.de>2015-01-08 00:32:29 +0000
commit023460cf00841294fe32497bdeddac91659261b7 (patch)
tree4652e8490c7c7a27cad954ceda8d79102bcdae7e /src/rps
parenta6dc8c0e8778b15acbd1dee5aab4dbf23eeebf38 (diff)
downloadgnunet-023460cf00841294fe32497bdeddac91659261b7.tar.gz
gnunet-023460cf00841294fe32497bdeddac91659261b7.zip
small fix in random scheduling
Diffstat (limited to 'src/rps')
-rw-r--r--src/rps/gnunet-service-rps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 287ccf065..57fecb136 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -782,9 +782,9 @@ do_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
782 struct GNUNET_TIME_Relative half_round_interval; 782 struct GNUNET_TIME_Relative half_round_interval;
783 unsigned int rand_delay; 783 unsigned int rand_delay;
784 784
785 half_round_interval = GNUNET_TIME_relative_divide (round_interval, 2);
785 do 786 do
786 { 787 {
787 half_round_interval = GNUNET_TIME_relative_divide (round_interval, 2);
788 rand_delay = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, UINT_MAX/10); 788 rand_delay = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, UINT_MAX/10);
789 time_next_round = GNUNET_TIME_relative_multiply (time_next_round, rand_delay); 789 time_next_round = GNUNET_TIME_relative_multiply (time_next_round, rand_delay);
790 time_next_round = GNUNET_TIME_relative_divide (time_next_round, UINT_MAX/10); 790 time_next_round = GNUNET_TIME_relative_divide (time_next_round, UINT_MAX/10);