diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-10-18 11:29:48 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-10-18 11:29:48 +0000 |
commit | cb1f15d99cc240185a450b254c92adcb61a09790 (patch) | |
tree | 07f07cf287e98dc822551fc82a60bf86c10424f5 /src/fs/gnunet-service-fs.c | |
parent | 93326b9ca26d5dc7f4a50c76b7a84cd685af9b33 (diff) | |
download | gnunet-cb1f15d99cc240185a450b254c92adcb61a09790.tar.gz gnunet-cb1f15d99cc240185a450b254c92adcb61a09790.zip |
stuff
Diffstat (limited to 'src/fs/gnunet-service-fs.c')
-rw-r--r-- | src/fs/gnunet-service-fs.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 9f8ec98e3..ad1fa4475 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -3019,6 +3019,9 @@ process_reply (void *cls, | |||
3019 | struct PutMessage *pm; | 3019 | struct PutMessage *pm; |
3020 | struct ConnectedPeer *cp; | 3020 | struct ConnectedPeer *cp; |
3021 | struct GNUNET_TIME_Relative cur_delay; | 3021 | struct GNUNET_TIME_Relative cur_delay; |
3022 | #if SUPPORT_DELAYS | ||
3023 | struct GNUNET_TIME_Relative art_delay; | ||
3024 | #endif | ||
3022 | size_t msize; | 3025 | size_t msize; |
3023 | 3026 | ||
3024 | #if DEBUG_FS | 3027 | #if DEBUG_FS |
@@ -3210,10 +3213,15 @@ process_reply (void *cls, | |||
3210 | reply->cont = &transmit_reply_continuation; | 3213 | reply->cont = &transmit_reply_continuation; |
3211 | reply->cont_cls = pr; | 3214 | reply->cont_cls = pr; |
3212 | #if SUPPORT_DELAYS | 3215 | #if SUPPORT_DELAYS |
3216 | art_delay = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, | ||
3217 | GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, | ||
3218 | TTL_DECREMENT)); | ||
3213 | reply->delay_until | 3219 | reply->delay_until |
3214 | = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, | 3220 | = GNUNET_TIME_relative_to_absolute (art_delay); |
3215 | GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, | 3221 | GNUNET_STATISTICS_update (stats, |
3216 | TTL_DECREMENT))); | 3222 | gettext_noop ("cummulative artificial delay introduced (ms)"), |
3223 | art_delay.value, | ||
3224 | GNUNET_NO); | ||
3217 | #endif | 3225 | #endif |
3218 | reply->msize = msize; | 3226 | reply->msize = msize; |
3219 | reply->priority = UINT32_MAX; /* send replies first! */ | 3227 | reply->priority = UINT32_MAX; /* send replies first! */ |