1. altered PC21 logic somewhat to eliminate dup PC21s
2. disconnect should remove dangling local users in the routing table.
3. fixed nasty recursive timer bug
+4. added some extra info to make connect tracking a bit easier.
09Apr01=======================================================================
1. changed lockfile name to cluster.lck (from .lock) for MSWin's benefit
08Apr01=======================================================================
$conn->{blocking} = 0;
my ($rproc, $eproc) = &{$server_conn->{rproc}} ($conn, $conn->{peerhost} = $sock->peerhost(), $conn->{peerport} = $sock->peerport());
+ dbg('connll', "accept $conn->{cnum} from $conn->{peerhost} $conn->{peerport}");
if ($eproc) {
$conn->{eproc} = $eproc;
Msg::set_event_handler ($sock, "error" => $eproc);
if ($f) {
while (<$f>) {
chomp;
- dbg('connll', $_);
- $conn->send_raw($_ . $conn->{lineend});
+ my $l = $_;
+ dbg('connll', "connect $conn->{cnum}: $l");
+ $conn->send_raw($l . $conn->{lineend});
}
$f->close;
}
csort => 'telnet',
timeval => 60,
blocking => 0,
+ cnum => ++$noconns,
};
- $noconns++;
dbg('connll', "Connection created ($noconns)");
return bless $conn, $class;
}
confess "changing $pkg->{call} to $call" if exists $pkg->{call} && $call ne $pkg->{call};
$pkg->{call} = $call;
$ref = $conns{$call} = $pkg;
- dbg('connll', "Connection $call stored");
+ dbg('connll', "Connection $pkg->{cnum} $call stored");
} else {
$ref = $conns{$call};
}
delete $conns{$call} if $ref && $ref == $conn;
}
$call ||= 'unallocated';
- dbg('connll', "Connection $call disconnected");
+ dbg('connll', "Connection $conn->{cnum} $call disconnected");
unless ($main::is_win) {
kill 'TERM', $conn->{pid} if exists $conn->{pid};
{
my $conn = shift;
my $call = $conn->{call} || 'unallocated';
- dbg('connll', "Connection $call being destroyed ($noconns)");
+ my $host = $conn->{peerhost} || '';
+ my $port = $conn->{peerport} || '';
+ dbg('connll', "Connection $conn->{cnum} $call [$host $port] being destroyed");
$noconns--;
}