Author: toad
Date: 2008-09-01 23:02:52 +0000 (Mon, 01 Sep 2008)
New Revision: 22332

Modified:
   trunk/freenet/src/freenet/clients/http/ConnectionsToadlet.java
Log:
Another doh


Modified: trunk/freenet/src/freenet/clients/http/ConnectionsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/ConnectionsToadlet.java      
2008-09-01 22:58:44 UTC (rev 22331)
+++ trunk/freenet/src/freenet/clients/http/ConnectionsToadlet.java      
2008-09-01 23:02:52 UTC (rev 22332)
@@ -418,11 +418,14 @@
                                                header.addChild("span", new 
String[] { "title", "style" }, new String[] { 
L10n.getString(col.getExplanationKey()), "border-bottom: 1px dotted; cursor: 
help;" }, L10n.getString(col.getTitleKey()));
                                        }
                                }
-                               
-                               int numberOfSelectionSamples = 
peers.getNumberOfSelectionSamples().tailSet(now - 
PeerNode.SELECTION_SAMPLING_PERIOD).size();
+
+                               double totalSelectionRate = 0.0;
+                               for(PeerNodeStatus status : peerNodeStatuses) {
+                                       totalSelectionRate += 
status.getSelectionRate();
+                               }
                                for (int peerIndex = 0, peerCount = 
peerNodeStatuses.length; peerIndex < peerCount; peerIndex++) {                  
                    
                                        PeerNodeStatus peerNodeStatus = 
peerNodeStatuses[peerIndex];
-                                       drawRow(peerTable, peerNodeStatus, mode 
>= PageMaker.MODE_ADVANCED, fProxyJavascriptEnabled, now, path, 
enablePeerActions, endCols, drawMessageTypes, numberOfSelectionSamples);
+                                       drawRow(peerTable, peerNodeStatus, mode 
>= PageMaker.MODE_ADVANCED, fProxyJavascriptEnabled, now, path, 
enablePeerActions, endCols, drawMessageTypes, totalSelectionRate);

                                }



Reply via email to