projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix free talking in command mode
[spider.git]
/
cmd
/
show
/
connect.pl
diff --git
a/cmd/show/connect.pl
b/cmd/show/connect.pl
index 708113769fbb74008d17b6c8c493efd4909233ef..025c20ea9a29f37c3bdf72a7d6436b059a532e65 100644
(file)
--- a/
cmd/show/connect.pl
+++ b/
cmd/show/connect.pl
@@
-11,22
+11,29
@@
return (1, $self->msg('e5')) if $self->priv < 1;
my @out;
my $count;
my @out;
my $count;
-push @out, "Cnum Call Address/Port State Type Dir.";
+push @out, "Cnum Call Address/Port State Type Dir.
Module
";
foreach my $call (sort keys %Msg::conns) {
my $r = $Msg::conns{$call};
foreach my $call (sort keys %Msg::conns) {
my $r = $Msg::conns{$call};
- my $addr = "$r->{peerhost}/$r->{peerport}";
my $c = $call;
my $c = $call;
- if ($c =~ /^Server\s+(\S+)$/) {
+ my $addr;
+
+ if ($c =~ /^Server\s+(\S+)/) {
$addr = $1;
$c = "Server";
$addr = $1;
$c = "Server";
+ } else {
+ $addr = "AGW Port ($r->{agwport})" if exists $r->{agwport};
+ $addr ||= "$r->{peerhost}/$r->{peerport}";
+ $addr ||= "Unknown";
}
}
- push @out, sprintf(" %3d %-9s %-27.27s %3s %7s %8s",
+ my $csort = $r->{csort} || '';
+ my $sort = $r->{sort} || '';
+ push @out, sprintf(" %3d %-9s %-27.27s %3s %7s %8s %-8s",
$r->{cnum}, $c,
$addr, $r->{state},
$r->{cnum}, $c,
$addr, $r->{state},
- $
r->{csort}, $r->{sort}
);
+ $
csort, $sort, ref $r
);
$count++;
}
$count++;
}
-push @out, "$count Connections";
+push @out, "$count Connections
($Msg::noconns Allocated)
";
return (1, @out);
return (1, @out);