projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f5dbc0
)
- add randomness to the announce period: 10-20 min
author
Bart Polot
<bart@net.in.tum.de>
Mon, 4 Feb 2013 15:54:21 +0000
(15:54 +0000)
committer
Bart Polot
<bart@net.in.tum.de>
Mon, 4 Feb 2013 15:54:21 +0000
(15:54 +0000)
src/regex/gnunet-daemon-regexprofiler.c
patch
|
blob
|
history
diff --git
a/src/regex/gnunet-daemon-regexprofiler.c
b/src/regex/gnunet-daemon-regexprofiler.c
index f172011f8175e93d54ff28fe3079919f2260be4f..ea508f9d2a97481910fc664ccaf090696218871f 100644
(file)
--- a/
src/regex/gnunet-daemon-regexprofiler.c
+++ b/
src/regex/gnunet-daemon-regexprofiler.c
@@
-172,9
+172,19
@@
reannounce_regex (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
GNUNET_assert (NULL != announce_handle);
GNUNET_REGEX_reannounce (announce_handle);
}
- reannounce_task = GNUNET_SCHEDULER_add_delayed (reannounce_freq,
- &reannounce_regex,
- cls);
+
+ reannounce_task = GNUNET_SCHEDULER_add_delayed (
+ GNUNET_TIME_relative_add (reannounce_freq,
+ GNUNET_TIME_relative_multiply (
+ GNUNET_TIME_UNIT_SECONDS,
+ GNUNET_CRYPTO_random_u32 (
+ GNUNET_CRYPTO_QUALITY_WEAK,
+ 600
+ )
+ )
+ ),
+ &reannounce_regex,
+ cls);
}