diff options
author | Peter Palfrader <peter@palfrader.org> | 2002-07-17 17:06:44 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2002-07-17 17:06:44 +0000 |
commit | 0de702218fe446ccf8342e41ce32dff871b03fdd (patch) | |
tree | cf2c0a2e83da15141e6baf2cc71f03556b4d4da3 /Echolot/Pinger.pm | |
parent | 6e34ee5124cea160f08736992629c6760949bb1a (diff) |
moved makeHash to Tools
Diffstat (limited to 'Echolot/Pinger.pm')
-rw-r--r-- | Echolot/Pinger.pm | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/Echolot/Pinger.pm b/Echolot/Pinger.pm index 18f72f9..57efaa8 100644 --- a/Echolot/Pinger.pm +++ b/Echolot/Pinger.pm @@ -1,7 +1,7 @@ package Echolot::Pinger; # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: Pinger.pm,v 1.15 2002/07/17 16:14:23 weasel Exp $ +# $Id: Pinger.pm,v 1.16 2002/07/17 17:06:44 weasel Exp $ # =pod @@ -22,15 +22,6 @@ use English; use Echolot::Pinger::Mix; use Echolot::Pinger::CPunk; -sub makeHash($) { - my ($text) = @_; - - my $hash = Echolot::Tools::make_mac($text); - $hash = substr($hash, 0, 4); - my $sum = hex($hash); - return $sum; -}; - sub do_mix_ping($$$$$) { my ($address, $keyid, $time, $to, $body) = @_; @@ -109,7 +100,7 @@ sub send_pings() { for my $type (Echolot::Globals::get()->{'storage'}->get_types($address)) { next unless Echolot::Config::get()->{'do_pings'}->{$type}; for my $key (Echolot::Globals::get()->{'storage'}->get_keys($address, $type)) { - next unless ($this_call_id eq (makeHash($address.$type.$key) % $send_every_n_calls)); + next unless ($this_call_id eq (Echolot::Tools::makeShortNumHash($address.$type.$key) % $send_every_n_calls)); print "ping calling $type, $address, $key\n" if Echolot::Config::get()->{'verbose'}; do_ping($type, $address, $key); } |