projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aa8cc0d
)
Change ping averaging to be like TCP and become a smoothed RTT.
author
minima
<minima>
Fri, 7 Sep 2001 19:16:29 +0000
(19:16 +0000)
committer
minima
<minima>
Fri, 7 Sep 2001 19:16:29 +0000
(19:16 +0000)
Changes
patch
|
blob
|
history
perl/DXProt.pm
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index c14763d6d558ab30214afeff6ec8b539d123f361..ea3cff074749058dc523544ab292f523b6e248bb 100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-1,5
+1,6
@@
06Sep01=======================================================================
1. prevent nodes appearing as users from incoming PC16s
06Sep01=======================================================================
1. prevent nodes appearing as users from incoming PC16s
+2. Change ping averaging to be like TCP and become a smoothed RTT.
04Sep01=======================================================================
1. add delete/user command
03Sep01=======================================================================
04Sep01=======================================================================
1. add delete/user command
03Sep01=======================================================================
diff --git
a/perl/DXProt.pm
b/perl/DXProt.pm
index c26016ee5048ce9205175a484ae042c3be8b1b31..056402b9501257fc410ba747e72bfb3e49949e9b 100644
(file)
--- a/
perl/DXProt.pm
+++ b/
perl/DXProt.pm
@@
-1046,7
+1046,12
@@
sub normal
for (@{$tochan->{pingtime}}) {
$st += $_;
}
for (@{$tochan->{pingtime}}) {
$st += $_;
}
- $tochan->{pingave} = $st / @{$tochan->{pingtime}};
+ if (@{$tochan->{pingtime}} == 1) {
+ $tochan->{pingave} = $t;
+ } else {
+ $tochan->{pingave} = $tochan->{pingave} + (($t - $tochan->{pingave}) / 8);
+ }
+# $tochan->{pingave} = $st / @{$tochan->{pingtime}};
}
}
}
}
}
}