diff options
Diffstat (limited to 'src/rps/gnunet-service-rps.c')
-rw-r--r-- | src/rps/gnunet-service-rps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index 90aab93fd..9de1f8d3a 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c | |||
@@ -1508,7 +1508,7 @@ compute_rand_delay (struct GNUNET_TIME_Relative mean, | |||
1508 | * via multiplying round_interval with a 'fraction' (0 to value)/value | 1508 | * via multiplying round_interval with a 'fraction' (0 to value)/value |
1509 | */ | 1509 | */ |
1510 | rand_delay = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, max_rand_delay); | 1510 | rand_delay = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, max_rand_delay); |
1511 | ret = GNUNET_TIME_relative_multiply (mean, rand_delay); | 1511 | ret = GNUNET_TIME_relative_saturating_multiply (mean, rand_delay); |
1512 | ret = GNUNET_TIME_relative_divide (ret, max_rand_delay); | 1512 | ret = GNUNET_TIME_relative_divide (ret, max_rand_delay); |
1513 | ret = GNUNET_TIME_relative_add (ret, half_interval); | 1513 | ret = GNUNET_TIME_relative_add (ret, half_interval); |
1514 | 1514 | ||
@@ -2394,7 +2394,7 @@ run (void *cls, | |||
2394 | struct GNUNET_TIME_Relative half_round_interval; | 2394 | struct GNUNET_TIME_Relative half_round_interval; |
2395 | struct GNUNET_TIME_Relative max_round_interval; | 2395 | struct GNUNET_TIME_Relative max_round_interval; |
2396 | 2396 | ||
2397 | half_round_interval = GNUNET_TIME_relative_multiply (round_interval, .5); | 2397 | half_round_interval = GNUNET_TIME_relative_divide (round_interval, 2); |
2398 | max_round_interval = GNUNET_TIME_relative_add (round_interval, half_round_interval); | 2398 | max_round_interval = GNUNET_TIME_relative_add (round_interval, half_round_interval); |
2399 | 2399 | ||
2400 | prot_sampler = RPS_sampler_init (sampler_size_est_need, max_round_interval); | 2400 | prot_sampler = RPS_sampler_init (sampler_size_est_need, max_round_interval); |