projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add pc93 talk messages
[spider.git]
/
perl
/
RouteDB.pm
diff --git
a/perl/RouteDB.pm
b/perl/RouteDB.pm
index 42cf693f76f65a6d06772b3a68b36aaa131e6979..96d0b0b4691a690c6d13d647040c67b108e759f1 100644
(file)
--- a/
perl/RouteDB.pm
+++ b/
perl/RouteDB.pm
@@
-90,7
+90,7
@@
sub update
my $interface = shift;
my $hops = shift || $default;
my $ref = $list{$call} || RouteDB->new($call);
my $interface = shift;
my $hops = shift || $default;
my $ref = $list{$call} || RouteDB->new($call);
- my $iref = $ref->{item}->{$interface} ||= RouteDB::Item->new($interface);
+ my $iref = $ref->{item}->{$interface} ||= RouteDB::Item->new($interface
, $hops
);
$iref->{count}++;
$iref->{hops} = $hops if $hops < $iref->{hops};
$iref->{t} = shift || $main::systime;
$iref->{count}++;
$iref->{hops} = $hops if $hops < $iref->{hops};
$iref->{t} = shift || $main::systime;
@@
-142,7
+142,8
@@
sub new
{
my $pkg = shift;
my $call = shift;
{
my $pkg = shift;
my $call = shift;
- return bless {call => $call, hops => $RouteDB::default}, (ref $pkg || $pkg);
+ my $hops = shift || $RouteDB::default;
+ return bless {call => $call, hops => $hops}, (ref $pkg || $pkg);
}
1;
}
1;