fix ?
[spider.git] / cmd / show / connect.pl
index 98211ddfd31b3dc9d6560fb8d0fa1d8119d703f1..025c20ea9a29f37c3bdf72a7d6436b059a532e65 100644 (file)
@@ -18,11 +18,13 @@ foreach my $call (sort keys %Msg::conns) {
        my $c = $call;
        my $addr;
        
-       if ($c =~ /^Server\s+(\S+)$/) {
+       if ($c =~ /^Server\s+(\S+)/) {
                $addr = $1;
                $c = "Server";
        } else {
-               $addr = "$r->{peerhost}/$r->{peerport}";
+               $addr = "AGW Port ($r->{agwport})" if exists $r->{agwport};
+               $addr ||= "$r->{peerhost}/$r->{peerport}";
+               $addr ||= "Unknown";
        }
        my $csort = $r->{csort} || '';
        my $sort = $r->{sort} || '';