X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FRoute%2FNode.pm;h=e29fe3caefb1eeb393dd1322ff21f99ee3428888;hb=d856b7a8fa2eafb3b2901d4bef9565221e7cf6a2;hp=6b4f4332de9a8ff163054d37b4733cb7d23879f6;hpb=101516b420ac77cd9eb8294651104e43f3461c06;p=spider.git diff --git a/perl/Route/Node.pm b/perl/Route/Node.pm index 6b4f4332..e29fe3ca 100644 --- a/perl/Route/Node.pm +++ b/perl/Route/Node.pm @@ -128,11 +128,19 @@ sub add_user { 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); - 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; }