diff --git a/apps/BOB/src/net/i2p/BOB/DoCMDS.java b/apps/BOB/src/net/i2p/BOB/DoCMDS.java index 9894530d810118552bdbe8bae3a43a0c70386673..81c29cc037f823fdb43fb285acb9857d88e8f51f 100644 --- a/apps/BOB/src/net/i2p/BOB/DoCMDS.java +++ b/apps/BOB/src/net/i2p/BOB/DoCMDS.java @@ -32,11 +32,12 @@ import java.net.Socket; import java.util.Properties; import java.util.StringTokenizer; import java.util.concurrent.atomic.AtomicBoolean; +import net.i2p.I2PAppContext; import net.i2p.I2PException; import net.i2p.client.I2PClientFactory; -import net.i2p.data.DataFormatException; +//import net.i2p.data.DataFormatException; import net.i2p.data.Destination; -import net.i2p.i2ptunnel.I2PTunnel; +//import net.i2p.i2ptunnel.I2PTunnel; import net.i2p.util.Log; // needed only for debugging. // import java.util.logging.Level; @@ -52,7 +53,7 @@ public class DoCMDS implements Runnable { // FIX ME // I need a better way to do versioning, but this will do for now. - public static final String BMAJ = "00", BMIN = "00", BREV = "0E", BEXT = ""; + public static final String BMAJ = "00", BMIN = "00", BREV = "0F", BEXT = ""; public static final String BOBversion = BMAJ + "." + BMIN + "." + BREV + BEXT; private Socket server; private Properties props; @@ -456,11 +457,14 @@ public class DoCMDS implements Runnable { String reply = null; if (Arg.endsWith(".i2p")) { try { - try { - dest = I2PTunnel.destFromName(Arg); - } catch (DataFormatException ex) { + //try { + //dest = I2PTunnel.destFromName(Arg); + //} catch (DataFormatException ex) { + //} + dest = I2PAppContext.getGlobalContext().namingService().lookup(Arg); + if(dest != null) { + reply = dest.toBase64(); } - reply = dest.toBase64(); } catch (NullPointerException npe) { // Could not find the destination!? } diff --git a/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java b/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java index a537d942f8769d7476140fafbfa9cb28f9a5aed7..0e00f1c50e421dbe3ddd2686f8985a680117dec1 100644 --- a/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java +++ b/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java @@ -36,7 +36,8 @@ import net.i2p.client.streaming.I2PSocket; import net.i2p.client.streaming.I2PSocketManager; import net.i2p.data.DataFormatException; import net.i2p.data.Destination; -import net.i2p.i2ptunnel.I2PTunnel; +//import net.i2p.i2ptunnel.I2PTunnel; +import net.i2p.I2PAppContext; /** * @@ -146,11 +147,11 @@ public class TCPtoI2P implements Runnable { input = line.toLowerCase(); Destination dest = null; if (input.endsWith(".i2p")) { - try { - dest = I2PTunnel.destFromName(input); + //dest = I2PTunnel.destFromName(input); + dest = I2PAppContext.getGlobalContext().namingService().lookup(input); + if (dest != null) { line = dest.toBase64(); - } catch (NullPointerException npe) { - // Could not find the destination!? + } else { Emsg("Can't find destination: " + input, out); return; }