projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix talk and routing problems to mycall
[spider.git]
/
perl
/
Route
/
Node.pm
diff --git
a/perl/Route/Node.pm
b/perl/Route/Node.pm
index eb2f536bd4e96a55d3a1058b3af2419051094931..e29fe3caefb1eeb393dd1322ff21f99ee3428888 100644
(file)
--- a/
perl/Route/Node.pm
+++ b/
perl/Route/Node.pm
@@
-128,11
+128,19
@@
sub add_user
{
my $self = shift;
my $ucall = shift;
{
my $self = shift;
my $ucall = shift;
+
+ confess "Trying to add NULL User call to routing tables" unless $ucall;
+
$self->_adduser($ucall);
$self->{usercount} = scalar @{$self->{users}};
my $uref = Route::User::get($ucall);
$self->_adduser($ucall);
$self->{usercount} = scalar @{$self->{users}};
my $uref = Route::User::get($ucall);
- my @out = (Route::User->new($ucall, $self->{call}, @_)) unless $uref;
+ my @out;
+ if ($uref) {
+ $uref->addparent($self->{call});
+ } else {
+ @out = Route::User->new($ucall, $self->{call}, @_);
+ }
return @out;
}
return @out;
}
@@
-206,7
+214,7
@@
sub get
my $call = shift;
$call = shift if ref $call;
my $ref = $list{uc $call};
my $call = shift;
$call = shift if ref $call;
my $ref = $list{uc $call};
- dbg(
'routerr', "Failed to get Node $call" ) unless $ref
;
+ dbg(
"Failed to get Node $call" ) if !$ref && isdbg('routerr')
;
return $ref;
}
return $ref;
}
@@
-259,7
+267,7
@@
sub DESTROY
my $pkg = ref $self;
my $call = $self->{call} || "Unknown";
my $pkg = ref $self;
my $call = $self->{call} || "Unknown";
- dbg(
'route', "destroying $pkg with $call"
);
+ dbg(
"destroying $pkg with $call") if isdbg('routelow'
);
}
#
}
#