+10Apr01=======================================================================
+1. altered PC21 logic somewhat to eliminate dup PC21s
+2. disconnect should remove dangling local users in the routing table.
09Apr01=======================================================================
1. changed lockfile name to cluster.lck (from .lock) for MSWin's benefit
08Apr01=======================================================================
push @out, $self->msg('disc2', $call);
} elsif (my $conn = Msg->conns($call)) {
$conn->disconnect;
+ push @out, $self->msg('disc3', $call);
+ } elsif (my $ref = DXCLuster->get_exact($call)) {
+ my $dxchan = $ref->dxchan;
+ if ($dxchan && $dxchan->call eq $main::mycall) {
+ $ref->del;
+ push @out, $self->msg('disc4', $call);
+ }
} else {
push @out, $self->msg('e10', $call);
}
my $mref = DXMsg::get_busy($call);
$mref->stop_msg($call) if $mref;
- # broadcast to all other nodes that all the nodes connected to via me are gone
+ # create a list of all the nodes that have gone and delete them from the table
+ my @nodes;
foreach my $node (grep { $_->dxchan == $self } DXNode::get_all) {
-# next if $node->call eq $call;
+ next if $node->dxchancall eq $call;
next if $node->call eq $main::mycall;
- broadcast_ak1a(pc21($node->call, 'Gone.'), $self) unless $self->{isolate};
+ push @nodes, $node->call;
$node->del;
}
+ # broadcast to all other nodes that all the nodes connected to via me are gone
+ unless ($self->{isolate}) {
+ push @nodes, $call;
+ for (@nodes) {
+ broadcast_ak1a(pc21($_, 'Gone.'), $self);
+ }
+ }
+
+ # remove this node from the tables
+ my $node = DXCluster->get_exact($call);
+ $node->del if $node;
+
# remove outstanding pings
delete $pings{$call};
- # now broadcast to all other ak1a nodes that I have gone
- broadcast_ak1a(pc21($call, 'Gone.'), $self) unless $self->{isolate};
-
# I was the last node visited
$self->user->node($main::mycall);
confail => 'connection to $_[0] failed ($_[1])',
constart => 'connection to $_[0] started',
disc1 => 'Disconnected by $_[0]',
- disc2 => '$_[0] disconnected',
+ disc2 => 'Channel $_[0] disconnected',
+ disc3 => 'No Channel, but connection $_[0] disconnected',
+ disc4 => 'No Channel or connection but orphan $_[0] disconnected',
db1 => 'This database is hosted at $_[0]',
db2 => 'Sorry, but key: $_[0] was not found in $_[1]',
db3 => 'Sorry, database $_[0] doesn\'t exist here',