diff --git a/apps/addressbook/java/src/net/i2p/addressbook/Daemon.java b/apps/addressbook/java/src/net/i2p/addressbook/Daemon.java index f1ba58cd0..60b161f28 100644 --- a/apps/addressbook/java/src/net/i2p/addressbook/Daemon.java +++ b/apps/addressbook/java/src/net/i2p/addressbook/Daemon.java @@ -22,6 +22,7 @@ package net.i2p.addressbook; import java.io.File; +import java.io.IOException; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; @@ -168,8 +169,11 @@ public class Daemon { if (publishedNS == null) publishedNS = new SingleFileNamingService(I2PAppContext.getGlobalContext(), published.getAbsolutePath()); success = publishedNS.putIfAbsent(key, dest); - if (!success) - log.append("Save to published addressbook " + published.getAbsolutePath() + " failed for new key " + key); + if (!success) { + try { + log.append("Save to published address book " + published.getCanonicalPath() + " failed for new key " + key); + } catch (IOException ioe) {} + } } if (isTextFile) // keep track for later dup check diff --git a/apps/susidns/src/css.css b/apps/susidns/src/css.css index f3a57d4ef..fcb29457c 100644 --- a/apps/susidns/src/css.css +++ b/apps/susidns/src/css.css @@ -14,7 +14,7 @@ p { } span.addrhlpr { - font-size:7pt; + font-size:8pt; } h3 { @@ -41,8 +41,7 @@ th { color:black; line-height:12pt; - margin-left:5mm; - margin-right:5mm; + padding:5px 10px; font-size:10pt; } @@ -50,8 +49,7 @@ td { color:black; line-height:12pt; - margin-left:5mm; - margin-right:5mm; + padding:5px 10px; font-size:10pt; vertical-align:center; } diff --git a/apps/susidns/src/jsp/addressbook.jsp b/apps/susidns/src/jsp/addressbook.jsp index b1d90b566..578ccab8c 100644 --- a/apps/susidns/src/jsp/addressbook.jsp +++ b/apps/susidns/src/jsp/addressbook.jsp @@ -141,7 +141,7 @@ ${book.loadBookMessages} <%=intl._("Name")%> -<%=intl._("Links")%> +<%=intl._("Links")%> <%=intl._("Destination")%> @@ -152,8 +152,9 @@ ${book.loadBookMessages} ${addr.displayName} -(b32) -(<%=intl._("details")%>) +">b32 + +"><%=intl._("details")%> @@ -180,10 +181,13 @@ ${book.loadBookMessages}

<%=intl._("Add new destination")%>:

-

-<%=intl._("Hostname")%>: -<%=intl._("Destination")%>:
-

+
+<%=intl._("Host Name")%> +
+<%=intl._("Destination")%> +
+

+" > " > " >

diff --git a/core/java/src/net/i2p/client/naming/BlockfileNamingService.java b/core/java/src/net/i2p/client/naming/BlockfileNamingService.java index 879a36adf..f587c643d 100644 --- a/core/java/src/net/i2p/client/naming/BlockfileNamingService.java +++ b/core/java/src/net/i2p/client/naming/BlockfileNamingService.java @@ -163,7 +163,6 @@ public class BlockfileNamingService extends DummyNamingService { info.setProperty(PROP_LISTS, list); hdr.put(PROP_INFO, info); - // TODO all in one skiplist or separate? int total = 0; for (String hostsfile : getFilenames(list)) { File file = new File(_context.getRouterDir(), hostsfile); @@ -171,6 +170,7 @@ public class BlockfileNamingService extends DummyNamingService { continue; int count = 0; BufferedReader in = null; + String sourceMsg = "Imported from " + hostsfile + " file"; try { in = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"), 16*1024); String line = null; @@ -189,8 +189,11 @@ public class BlockfileNamingService extends DummyNamingService { String b64 = line.substring(split+1); //.trim() ?????????????? Destination d = lookupBase64(b64); if (d != null) { - addEntry(rv, hostsfile, key, d, hostsfile); + addEntry(rv, hostsfile, key, d, sourceMsg); count++; + } else { + _log.logAlways(Log.WARN, "Unable to import entry for " + key + + " from file " + file + " - bad Base 64: " + b64); } } } catch (IOException ioe) { diff --git a/core/java/src/net/i2p/client/naming/NamingService.java b/core/java/src/net/i2p/client/naming/NamingService.java index b9ffd6299..cb8620cfe 100644 --- a/core/java/src/net/i2p/client/naming/NamingService.java +++ b/core/java/src/net/i2p/client/naming/NamingService.java @@ -83,7 +83,7 @@ public abstract class NamingService { result.fromBase64(hostname); return result; } catch (DataFormatException dfe) { - if (_log.shouldLog(Log.WARN)) _log.warn("Error translating [" + hostname + "]", dfe); + if (_log.shouldLog(Log.WARN)) _log.warn("Bad B64 dest [" + hostname + "]", dfe); return null; } }