added some rsfp checking
[spider.git] / perl / Route / Node.pm
index 08b74c737295b15006a959e431a0eaa34b19fd42..2a9c585dbd91c23a9fc0d27413a2fbbf57bf35c7 100644 (file)
@@ -90,12 +90,12 @@ sub del
 
        # delete parent from this call's parent list
        $pref->_delnode($self);
-       my @ref = $self->_delparent($pref);
+    $self->_delparent($pref);
        my @nodes;
        my $ncall = $self->{call};
        
        # is this the last connection, I have no parents anymore?
-       unless (@ref) {
+       unless (@{$self->{parent}}) {
                foreach my $rcall (@{$self->{nodes}}) {
                        next if grep $rcall eq $_, @_;
                        my $r = Route::Node::get($rcall);
@@ -189,6 +189,12 @@ sub nodes
        return @{$self->{nodes}};
 }
 
+sub parents
+{
+       my $self = shift;
+       return @{$self->{parent}};
+}
+
 sub rnodes
 {
        my $self = shift;