forked from I2P_Developers/i2p.i2p
BOB: just some cleanup
This commit is contained in:
@@ -41,7 +41,6 @@ public class I2Plistener implements Runnable {
|
|||||||
|
|
||||||
private NamedDB info, database;
|
private NamedDB info, database;
|
||||||
private Log _log;
|
private Log _log;
|
||||||
// private int tgwatch;
|
|
||||||
public I2PSocketManager socketManager;
|
public I2PSocketManager socketManager;
|
||||||
public I2PServerSocket serverSocket;
|
public I2PServerSocket serverSocket;
|
||||||
private AtomicBoolean lives;
|
private AtomicBoolean lives;
|
||||||
@@ -103,7 +102,7 @@ public class I2Plistener implements Runnable {
|
|||||||
serverSocket.close();
|
serverSocket.close();
|
||||||
} catch (I2PException ex) {
|
} catch (I2PException ex) {
|
||||||
}
|
}
|
||||||
// System.out.println("I2Plistener: Close");
|
// System.out.println("I2Plistener: Close");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -108,16 +108,6 @@ public class MUXlisten implements Runnable {
|
|||||||
this.listener = new ServerSocket(port, backlog, host);
|
this.listener = new ServerSocket(port, backlog, host);
|
||||||
}
|
}
|
||||||
socketManager = I2PSocketManagerFactory.createManager(prikey, Q);
|
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) {
|
} catch (IOException e) {
|
||||||
// Something went bad.
|
// Something went bad.
|
||||||
this.database.getWriteLock();
|
this.database.getWriteLock();
|
||||||
@@ -194,7 +184,6 @@ public class MUXlisten implements Runnable {
|
|||||||
lock.set(false);
|
lock.set(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// socketManager.addDisconnectListener(new DisconnectListener());
|
|
||||||
lives.set(true);
|
lives.set(true);
|
||||||
lock.set(false);
|
lock.set(false);
|
||||||
quit:
|
quit:
|
||||||
@@ -347,7 +336,6 @@ public class MUXlisten implements Runnable {
|
|||||||
String boner = tg.getName();
|
String boner = tg.getName();
|
||||||
// System.out.println("BOB: MUXlisten: Starting thread collection for: " + boner);
|
// System.out.println("BOB: MUXlisten: Starting thread collection for: " + boner);
|
||||||
_log.warn("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) {
|
if (tg.activeCount() + tg.activeGroupCount() != 0) {
|
||||||
// visit(tg, 0, boner);
|
// visit(tg, 0, boner);
|
||||||
int foo = tg.activeCount() + tg.activeGroupCount();
|
int foo = tg.activeCount() + tg.activeGroupCount();
|
||||||
|
@@ -95,14 +95,9 @@ public class TCPio implements Runnable {
|
|||||||
if (b > 0) {
|
if (b > 0) {
|
||||||
Aout.write(a, 0, b);
|
Aout.write(a, 0, b);
|
||||||
} else if (b == 0) {
|
} else if (b == 0) {
|
||||||
// Will this die? We'll see.
|
|
||||||
while(Ain.available() == 0) {
|
while(Ain.available() == 0) {
|
||||||
Thread.sleep(20);
|
Thread.sleep(20);
|
||||||
}
|
}
|
||||||
// Thread.yield(); // this should act like a mini sleep.
|
|
||||||
// if (Ain.available() == 0) {
|
|
||||||
// Thread.sleep(10);
|
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
/* according to the specs:
|
/* according to the specs:
|
||||||
*
|
*
|
||||||
|
@@ -27,8 +27,6 @@ import java.io.IOException;
|
|||||||
import java.net.ServerSocket;
|
import java.net.ServerSocket;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
// import net.i2p.client.I2PSession;
|
|
||||||
// import net.i2p.client.I2PSessionException;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import net.i2p.client.streaming.I2PServerSocket;
|
import net.i2p.client.streaming.I2PServerSocket;
|
||||||
import net.i2p.client.streaming.I2PSocketManager;
|
import net.i2p.client.streaming.I2PSocketManager;
|
||||||
|
@@ -108,20 +108,18 @@ public class TCPtoI2P implements Runnable {
|
|||||||
* @throws java.io.IOException
|
* @throws java.io.IOException
|
||||||
*/
|
*/
|
||||||
private void Emsg(String e, OutputStream out) throws 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("ERROR ".concat(e).getBytes());
|
||||||
out.write(13);
|
out.write(13);
|
||||||
out.write(10);
|
out.write(10);
|
||||||
out.flush();
|
out.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void rlock() throws Exception {
|
|
||||||
private void rlock() {
|
private void rlock() {
|
||||||
database.getReadLock();
|
database.getReadLock();
|
||||||
info.getReadLock();
|
info.getReadLock();
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void runlock() throws Exception {
|
|
||||||
private void runlock() {
|
private void runlock() {
|
||||||
info.releaseReadLock();
|
info.releaseReadLock();
|
||||||
database.releaseReadLock();
|
database.releaseReadLock();
|
||||||
|
@@ -111,7 +111,7 @@ public class UDPIOthread implements I2PSessionListener, Runnable {
|
|||||||
* @param size
|
* @param size
|
||||||
*/
|
*/
|
||||||
public void messageAvailable(I2PSession session, int msgId, long 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 {
|
try {
|
||||||
byte msg[] = session.receiveMessage(msgId);
|
byte msg[] = session.receiveMessage(msgId);
|
||||||
out.write(msg);
|
out.write(msg);
|
||||||
|
@@ -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
|
2012-08-15 zzz
|
||||||
* i2psnark:
|
* i2psnark:
|
||||||
- Fix bug preventing completion announcement, broken in 0.9.1
|
- Fix bug preventing completion announcement, broken in 0.9.1
|
||||||
|
Reference in New Issue
Block a user