Author: toad
Date: 2006-04-27 21:35:03 +0000 (Thu, 27 Apr 2006)
New Revision: 8591

Modified:
   trunk/freenet/src/freenet/clients/http/QueueToadlet.java
   trunk/freenet/src/freenet/node/Version.java
Log:
666: Minor fixes.

Modified: trunk/freenet/src/freenet/clients/http/QueueToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/QueueToadlet.java    2006-04-27 
21:06:19 UTC (rev 8590)
+++ trunk/freenet/src/freenet/clients/http/QueueToadlet.java    2006-04-27 
21:35:03 UTC (rev 8591)
@@ -298,7 +298,7 @@

                        if(!uncompletedUpload.isEmpty()) {
                                writeTableHead("Uploads in progress", new 
String[] { "", "Identifier", "Filename", "Size", "Type", "Success", 
"Persistence", "Key" }, buf);
-                               for(Iterator i = 
uncompletedDownload.iterator();i.hasNext();) {
+                               for(Iterator i = 
uncompletedUpload.iterator();i.hasNext();) {
                                        ClientPut p = (ClientPut) i.next();
                                        writeRowStart(buf);
                                        writeDeleteCell(p, buf);
@@ -357,7 +357,7 @@
                        buf.append("<td>UNKNOWN</td>\n");
                } else {
                        buf.append("<td>");
-                       buf.append(frac * 100);
+                       buf.append((int)(frac * 100));
                        buf.append("%</td>\n");
                }
        }
@@ -401,11 +401,15 @@

        private void writeIdentifierCell(ClientRequest p, FreenetURI uri, 
StringBuffer buf) {
                buf.append("<td>");
-               buf.append("<a href=\"/");
-               buf.append(uri.toString(false));
-               buf.append("\">");
+               if(uri != null) {
+                       buf.append("<a href=\"/");
+                       buf.append(uri.toString(false));
+                       buf.append("\">");
+               }
                buf.append(HTMLEncoder.encode(p.getIdentifier()));
-               buf.append("</a></td>\n");
+               if(uri != null)
+                       buf.append("</a>");
+               buf.append("</td>\n");
        }

        private void writePersistenceCell(ClientRequest p, StringBuffer buf) {
@@ -445,13 +449,18 @@

        private void writeKeyCell(FreenetURI uri, StringBuffer buf) {
                buf.append("<td>");
-               buf.append("<a href=\"/");
-               String u = uri.toString(false);
-               buf.append(URLEncoder.encode(u));
-               buf.append("\">");
-               // FIXME too long? maybe only show the human readable bit?
-               buf.append(HTMLEncoder.encode(u));
-               buf.append("</a></td>\n");
+               if(uri != null) {
+                       buf.append("<a href=\"/");
+                       String u = uri.toString(false);
+                       buf.append(URLEncoder.encode(u));
+                       buf.append("\">");
+                       // FIXME too long? maybe only show the human readable 
bit?
+                       buf.append(HTMLEncoder.encode(u));
+                       buf.append("</a>");
+               } else {
+                       buf.append("UNKNOWN");
+               }
+               buf.append("</td>\n");
        }

        private void writeRowStart(StringBuffer buf) {

Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-04-27 21:06:19 UTC (rev 
8590)
+++ trunk/freenet/src/freenet/node/Version.java 2006-04-27 21:35:03 UTC (rev 
8591)
@@ -20,7 +20,7 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       private static final int buildNumber = 665;
+       private static final int buildNumber = 666;

        /** Oldest build of Fred we will talk to */
        private static final int lastGoodBuild = 591;


Reply via email to