users => '0,Users,parray',
usercount => '0,User Count',
version => '0,Version',
users => '0,Users,parray',
usercount => '0,User Count',
version => '0,Version',
handle_xml => '0,Using XML,yesno',
lastmsg => '0,Last Route Msg,atime',
lastid => '0,Last Route MsgID',
do_pc9x => '0,Uses pc9x,yesno',
via_pc92 => '0,Came in via pc92,yesno',
obscount => '0,Obscount',
handle_xml => '0,Using XML,yesno',
lastmsg => '0,Last Route Msg,atime',
lastid => '0,Last Route MsgID',
do_pc9x => '0,Uses pc9x,yesno',
via_pc92 => '0,Came in via pc92,yesno',
obscount => '0,Obscount',
-# called as $parent->add(call, dxchan, version, flags)
+# called as $parent->add(call, dxchan, version, flags)
# is this the last connection, I have no parents anymore?
unless (@{$self->{parent}}) {
foreach my $rcall (@{$self->{nodes}}) {
# is this the last connection, I have no parents anymore?
unless (@{$self->{parent}}) {
foreach my $rcall (@{$self->{nodes}}) {
push @nodes, $r->del($self, $ncall, @_) if $r;
}
$self->_del_users;
push @nodes, $r->del($self, $ncall, @_) if $r;
}
$self->_del_users;
- foreach my $call (@{$self->{parent}}) {
- my $parent = Route::Node::get($call);
- push @out, $parent->del($self) if $parent;
+ if (@{$self->{parent}}) {
+ foreach my $call (@{$self->{parent}}) {
+ my $parent = Route::Node::get($call);
+ push @out, $parent->del($self) if $parent;
+ }
+ }
+ # get rid of my nodes
+ push @out, $self->del_nodes;
+ # this only happens if we a orphan with no parents
+ if ($list{$ncall}) {
+ push @out, $self;
+ delete $list{$ncall};
# a config type update for a node and returns
# the differences as lists of things that have gone away
# a config type update for a node and returns
# the differences as lists of things that have gone away
my $self = $pkg->SUPER::new($call);
$self->{parent} = ref $pkg ? [ $pkg->{call} ] : [ ];
$self->{version} = shift || 5401;
$self->{flags} = shift || Route::here(1);
$self->{users} = [];
$self->{nodes} = [];
my $self = $pkg->SUPER::new($call);
$self->{parent} = ref $pkg ? [ $pkg->{call} ] : [ ];
$self->{version} = shift || 5401;
$self->{flags} = shift || Route::here(1);
$self->{users} = [];
$self->{nodes} = [];
confess "Non-existant field '$AUTOLOAD'" unless $valid{$name} || $Route::valid{$name};
# this clever line of code creates a subroutine which takes over from autoload
confess "Non-existant field '$AUTOLOAD'" unless $valid{$name} || $Route::valid{$name};
# this clever line of code creates a subroutine which takes over from autoload