From: minima Date: Sun, 25 May 2003 12:33:31 +0000 (+0000) Subject: started the hierarchical view of the nodes X-Git-Tag: R1_51~12 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=7f77f123e7b001912474dacac3b3e1a11be8eb7c;p=spider.git started the hierarchical view of the nodes --- diff --git a/perl/DXProt.pm b/perl/DXProt.pm index e1d4fb28..b0fdd2d9 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -1005,6 +1005,8 @@ sub handle_19 # new routing list my @rout; + + # first get the INTERFACE node my $parent = Route::Node::get($self->{call}); unless ($parent) { dbg("DXPROT: my parent $self->{call} has disappeared"); @@ -1012,6 +1014,27 @@ sub handle_19 return; } + # if the origin isn't the same as the INTERFACE, then reparent, creating nodes as necessary + if ($origin ne $self->call) { + my $op = Route::Node::get($origin); + unless ($op) { + $op = $parent->add($origin, 5000, Route::here(1)); + my $user = DXUser->get_current($origin); + if (!$user) { + $user = DXUser->new($origin); + $user->sort('S'); + $user->priv(1); # I have relented and defaulted nodes + $user->lockout(1); + $user->homenode($origin); + $user->node($origin); + $user->wantroutepc19(1); + $user->wantpc90(1); + } + $user->put; + } + $parent = $op; + } + # parse the PC19 for ($i = 1; $i < $#_-1; $i += 4) { my $here = $_[$i];