projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
503168f
)
Make peerhost data more consistent
author
Dirk Koopman
<djk@tobit.co.uk>
Sun, 21 Jul 2013 22:38:24 +0000
(23:38 +0100)
committer
Dirk Koopman
<djk@tobit.co.uk>
Sun, 21 Jul 2013 22:38:24 +0000
(23:38 +0100)
cmd/links.pl
patch
|
blob
|
history
perl/ExtMsg.pm
patch
|
blob
|
history
diff --git
a/cmd/links.pl
b/cmd/links.pl
index a66ee19469cd70404adabb9698b9207a97fc0c1a..8856ba2703a6dd1ad6ae92c5148881d795ea0b3d 100644
(file)
--- a/
cmd/links.pl
+++ b/
cmd/links.pl
@@
-25,8
+25,8
@@
foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all_nodes ) {
my $sort;
my $name = $dxchan->user->name || " ";
my $obscount = $dxchan->nopings;
my $sort;
my $name = $dxchan->user->name || " ";
my $obscount = $dxchan->nopings;
- my $lastt = $dxchan->pingint - ($nowt - $dxchan->lastping);
my $pingint = $dxchan->pingint;
my $pingint = $dxchan->pingint;
+ my $lastt = $dxchan->lastping ? ($dxchan->pingint - ($nowt - $dxchan->lastping)) : $pingint;
my $ping = $dxchan->is_node && $dxchan != $main::me ? sprintf("%8.2f",$dxchan->pingave) : "";
my $iso = $dxchan->isolate ? 'Y' :' ';
my ($fin, $fout, $pc92) = (' ', ' ', ' ');
my $ping = $dxchan->is_node && $dxchan != $main::me ? sprintf("%8.2f",$dxchan->pingave) : "";
my $iso = $dxchan->isolate ? 'Y' :' ';
my ($fin, $fout, $pc92) = (' ', ' ', ' ');
@@
-45,6
+45,7
@@
foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all_nodes ) {
$lastt = 0;
$ping = " ";
}
$lastt = 0;
$ping = " ";
}
+
$sort = 'ANEA' if $dxchan->is_aranea;
$sort = "DXSP" if $dxchan->is_spider;
$sort = "CLX " if $dxchan->is_clx;
$sort = 'ANEA' if $dxchan->is_aranea;
$sort = "DXSP" if $dxchan->is_spider;
$sort = "CLX " if $dxchan->is_clx;
@@
-57,7
+58,8
@@
foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all_nodes ) {
my $addr = $dxchan->conn->peerhost;
$ipaddr = $addr if is_ipaddr($addr);
$ipaddr = 'local' if $addr =~ /^127\./ || $addr =~ /^::[0-9a-f]+$/;
my $addr = $dxchan->conn->peerhost;
$ipaddr = $addr if is_ipaddr($addr);
$ipaddr = 'local' if $addr =~ /^127\./ || $addr =~ /^::[0-9a-f]+$/;
- }
+ }
+ $ipaddr = 'ax25' if $dxchan->conn->ax25;
push @out, sprintf "%10s $sort $t$ping $obscount %5d %5d $iso $fin $fout $pc92 $ipaddr", $call, $pingint, $lastt;
}
push @out, sprintf "%10s $sort $t$ping $obscount %5d %5d $iso $fin $fout $pc92 $ipaddr", $call, $pingint, $lastt;
}
diff --git
a/perl/ExtMsg.pm
b/perl/ExtMsg.pm
index 6b2cce7d5059aea87f97a3af8d70632378aaf4da..f3f473ab7cb776b5cbd932f74e7e65edb36c5743 100644
(file)
--- a/
perl/ExtMsg.pm
+++ b/
perl/ExtMsg.pm
@@
-365,6
+365,7
@@
sub _doclient
$conn->conns($call);
$conn->{csort} = $f[1] if $f[1];
$conn->{state} = 'C';
$conn->conns($call);
$conn->{csort} = $f[1] if $f[1];
$conn->{state} = 'C';
+ eval {$conn->{peerhost} = $conn->{sock}->peerhost} unless $conn->ax25;
&{$conn->{rproc}}($conn, "O$call|$conn->{csort}");
delete $conn->{cmd};
$conn->{timeout}->del if $conn->{timeout};
&{$conn->{rproc}}($conn, "O$call|$conn->{csort}");
delete $conn->{cmd};
$conn->{timeout}->del if $conn->{timeout};