From e01521618f160edcf5f5b7df2dd04a231a81526d Mon Sep 17 00:00:00 2001 From: sponge Date: Fri, 17 Aug 2012 05:39:02 +0000 Subject: [PATCH] BOB: just some cleanup --- apps/BOB/src/net/i2p/BOB/I2Plistener.java | 3 +-- apps/BOB/src/net/i2p/BOB/MUXlisten.java | 12 ------------ apps/BOB/src/net/i2p/BOB/TCPio.java | 5 ----- apps/BOB/src/net/i2p/BOB/TCPlistener.java | 2 -- apps/BOB/src/net/i2p/BOB/TCPtoI2P.java | 4 +--- apps/BOB/src/net/i2p/BOB/UDPIOthread.java | 2 +- history.txt | 4 ++++ 7 files changed, 7 insertions(+), 25 deletions(-) diff --git a/apps/BOB/src/net/i2p/BOB/I2Plistener.java b/apps/BOB/src/net/i2p/BOB/I2Plistener.java index fc6dde6037..861a1fbca0 100644 --- a/apps/BOB/src/net/i2p/BOB/I2Plistener.java +++ b/apps/BOB/src/net/i2p/BOB/I2Plistener.java @@ -41,7 +41,6 @@ public class I2Plistener implements Runnable { private NamedDB info, database; private Log _log; -// private int tgwatch; public I2PSocketManager socketManager; public I2PServerSocket serverSocket; private AtomicBoolean lives; @@ -103,7 +102,7 @@ public class I2Plistener implements Runnable { serverSocket.close(); } catch (I2PException ex) { } - // System.out.println("I2Plistener: Close"); + // System.out.println("I2Plistener: Close"); } } } diff --git a/apps/BOB/src/net/i2p/BOB/MUXlisten.java b/apps/BOB/src/net/i2p/BOB/MUXlisten.java index 6a9e7b36c5..7d1e6478fb 100644 --- a/apps/BOB/src/net/i2p/BOB/MUXlisten.java +++ b/apps/BOB/src/net/i2p/BOB/MUXlisten.java @@ -108,16 +108,6 @@ public class MUXlisten implements Runnable { this.listener = new ServerSocket(port, backlog, host); } socketManager = I2PSocketManagerFactory.createManager(prikey, Q); - // I2PException, IOException, RuntimeException - // To bad we can't just catch and enumerate.... - // } catch (I2PException e) { - // Something went bad. - // this.database.getWriteLock(); - // this.info.getWriteLock(); - // this.info.add("STARTING", new Boolean(false)); - // this.info.releaseWriteLock(); - // this.database.releaseWriteLock(); - // throw new I2PException(e); } catch (IOException e) { // Something went bad. this.database.getWriteLock(); @@ -194,7 +184,6 @@ public class MUXlisten implements Runnable { lock.set(false); return; } -// socketManager.addDisconnectListener(new DisconnectListener()); lives.set(true); lock.set(false); quit: @@ -347,7 +336,6 @@ public class MUXlisten implements Runnable { String boner = tg.getName(); // System.out.println("BOB: MUXlisten: Starting thread collection for: " + boner); _log.warn("BOB: MUXlisten: Starting thread collection for: " + boner); - // tg.interrupt(); // give my stuff a small smack again. if (tg.activeCount() + tg.activeGroupCount() != 0) { // visit(tg, 0, boner); int foo = tg.activeCount() + tg.activeGroupCount(); diff --git a/apps/BOB/src/net/i2p/BOB/TCPio.java b/apps/BOB/src/net/i2p/BOB/TCPio.java index 20755b5cf2..ca3e5c833c 100644 --- a/apps/BOB/src/net/i2p/BOB/TCPio.java +++ b/apps/BOB/src/net/i2p/BOB/TCPio.java @@ -95,14 +95,9 @@ public class TCPio implements Runnable { if (b > 0) { Aout.write(a, 0, b); } else if (b == 0) { -// Will this die? We'll see. while(Ain.available() == 0) { Thread.sleep(20); } -// Thread.yield(); // this should act like a mini sleep. -// if (Ain.available() == 0) { -// Thread.sleep(10); -// } } else { /* according to the specs: * diff --git a/apps/BOB/src/net/i2p/BOB/TCPlistener.java b/apps/BOB/src/net/i2p/BOB/TCPlistener.java index 154e2a4d1e..35227481a2 100644 --- a/apps/BOB/src/net/i2p/BOB/TCPlistener.java +++ b/apps/BOB/src/net/i2p/BOB/TCPlistener.java @@ -27,8 +27,6 @@ import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import java.net.SocketTimeoutException; -// import net.i2p.client.I2PSession; -// import net.i2p.client.I2PSessionException; import java.util.concurrent.atomic.AtomicBoolean; import net.i2p.client.streaming.I2PServerSocket; import net.i2p.client.streaming.I2PSocketManager; diff --git a/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java b/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java index 42fe599e8b..05d3f5b651 100644 --- a/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java +++ b/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java @@ -108,20 +108,18 @@ public class TCPtoI2P implements Runnable { * @throws java.io.IOException */ private void Emsg(String e, OutputStream out) throws IOException { -// Debugging System.out.println("ERROR TCPtoI2P: " + e); + // Debugging System.out.println("ERROR TCPtoI2P: " + e); out.write("ERROR ".concat(e).getBytes()); out.write(13); out.write(10); out.flush(); } -// private void rlock() throws Exception { private void rlock() { database.getReadLock(); info.getReadLock(); } -// private void runlock() throws Exception { private void runlock() { info.releaseReadLock(); database.releaseReadLock(); diff --git a/apps/BOB/src/net/i2p/BOB/UDPIOthread.java b/apps/BOB/src/net/i2p/BOB/UDPIOthread.java index ff1a1f1ab7..b421a6a945 100644 --- a/apps/BOB/src/net/i2p/BOB/UDPIOthread.java +++ b/apps/BOB/src/net/i2p/BOB/UDPIOthread.java @@ -111,7 +111,7 @@ public class UDPIOthread implements I2PSessionListener, Runnable { * @param size */ public void messageAvailable(I2PSession session, int msgId, long size) { -// _log.debug("Message available: id = " + msgId + " size = " + size); + // _log.debug("Message available: id = " + msgId + " size = " + size); try { byte msg[] = session.receiveMessage(msgId); out.write(msg); diff --git a/history.txt b/history.txt index 669d6cc337..4da7fbd43d 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,7 @@ +2012-08-17 sponge + * BOB: just some cleanup of old, dead meaningless commentedout code + and a little reformatting. + 2012-08-15 zzz * i2psnark: - Fix bug preventing completion announcement, broken in 0.9.1