summaryrefslogtreecommitdiff
path: root/Echolot/Conf.pm
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2002-09-03 17:14:27 +0000
committerPeter Palfrader <peter@palfrader.org>2002-09-03 17:14:27 +0000
commit6ebd214a5ff027266f1582bf749aa639cf59b8f0 (patch)
treea12195135e38a30296ebd4135b6fdb3df1c018eb /Echolot/Conf.pm
parent6ab2d95e7cfeffb47332fbe70faa0c89c99f6aeb (diff)
Make ping/request time more random.
Encrypt pings (symmetrically), so that dup detection of some remailers (austria) fails and pings get processed.
Diffstat (limited to 'Echolot/Conf.pm')
-rw-r--r--Echolot/Conf.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/Echolot/Conf.pm b/Echolot/Conf.pm
index b426b47..63e2c88 100644
--- a/Echolot/Conf.pm
+++ b/Echolot/Conf.pm
@@ -1,7 +1,7 @@
package Echolot::Conf;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: Conf.pm,v 1.27 2002/08/23 07:17:23 weasel Exp $
+# $Id: Conf.pm,v 1.28 2002/09/03 17:14:26 weasel Exp $
#
=pod
@@ -45,8 +45,9 @@ sub send_requests($;$) {
my $call_intervall = Echolot::Config::get()->{'getkeyconf_interval'};
my $send_every_n_calls = Echolot::Config::get()->{'getkeyconf_every_nth_time'};
- my $timemod = ($scheduled_for / $call_intervall);
+ my $timemod = int ($scheduled_for / $call_intervall);
my $this_call_id = $timemod % $send_every_n_calls;
+ my $session_id = int ($scheduled_for / ($call_intervall * $send_every_n_calls));
Echolot::Globals::get()->{'storage'}->delay_commit();
@@ -65,7 +66,7 @@ sub send_requests($;$) {
next unless (
$which eq $address ||
$which eq 'all' ||
- (($which eq '') && ($this_call_id == (Echolot::Tools::makeShortNumHash($address.$type) % $send_every_n_calls))));
+ (($which eq '') && ($this_call_id == (Echolot::Tools::makeShortNumHash($address.$type.$session_id) % $send_every_n_calls))));
print "Sending $type requests to ".$address."\n"
if Echolot::Config::get()->{'verbose'};