projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ead255e
)
do a better job with 'u=' and 'o-'
author
minima
<minima>
Sat, 21 Jan 2006 17:54:04 +0000
(17:54 +0000)
committer
minima
<minima>
Sat, 21 Jan 2006 17:54:04 +0000
(17:54 +0000)
perl/DXXml/Ping.pm
patch
|
blob
|
history
diff --git
a/perl/DXXml/Ping.pm
b/perl/DXXml/Ping.pm
index d70d6e9a46104cb379b95653af96862f4b0388b0..e02b61f85ca081a9fceb5fbf823c485d41621c2d 100644
(file)
--- a/
perl/DXXml/Ping.pm
+++ b/
perl/DXXml/Ping.pm
@@
-97,7
+97,7
@@
sub handle_ping_reply
my $tochan = DXChannel::get($from);
while (@$ref) {
my $r = shift @$ref;
my $tochan = DXChannel::get($from);
while (@$ref) {
my $r = shift @$ref;
- my $dxchan = DXChannel::get($r->{
u
});
+ my $dxchan = DXChannel::get($r->{
o
});
next unless $dxchan;
my $t = tv_interval($r->{'-hirestime'}, [ gettimeofday ]);
if ($dxchan->is_node) {
next unless $dxchan;
my $t = tv_interval($r->{'-hirestime'}, [ gettimeofday ]);
if ($dxchan->is_node) {
@@
-120,7
+120,8
@@
sub handle_ping_reply
$tochan->{nopings} = $nopings; # pump up the timer
}
_handle_believe($from, $fromdxchan->{call});
$tochan->{nopings} = $nopings; # pump up the timer
}
_handle_believe($from, $fromdxchan->{call});
- } elsif ($dxchan->is_user) {
+ }
+ if (exists $r->{u} && ($dxchan = DXChannel::get($r->{u})) && $dxchan->is_user) {
my $s = sprintf "%.2f", $t;
my $ave = sprintf "%.2f", $tochan ? ($tochan->{pingave} || $t) : $t;
$dxchan->send($dxchan->msg('pingi', $from, $s, $ave))
my $s = sprintf "%.2f", $t;
my $ave = sprintf "%.2f", $tochan ? ($tochan->{pingave} || $t) : $t;
$dxchan->send($dxchan->msg('pingi', $from, $s, $ave))