merge of 'd34b6676e413f6e88f9e145f8ddde79a66ce6bb1'

and 'da507e67b02527a43e8cca4b5b20c2de18a3142c'
This commit is contained in:
zzz
2009-12-05 17:06:34 +00:00
7 changed files with 52 additions and 77 deletions

View File

@ -50,7 +50,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 = "09", BEXT = "";
public static final String BMAJ = "00", BMIN = "00", BREV = "0A", BEXT = "";
public static final String BOBversion = BMAJ + "." + BMIN + "." + BREV + BEXT;
private Socket server;
private Properties props;

View File

@ -60,20 +60,9 @@ public class I2Plistener implements Runnable {
this._log = _log;
this.socketManager = S;
this.serverSocket = SS;
// tgwatch = 1;
this.lives = lives;
}
private void rlock() throws Exception {
database.getReadLock();
info.getReadLock();
}
private void runlock() throws Exception {
database.releaseReadLock();
info.releaseReadLock();
}
/**
* Simply listen on I2P port, and thread connections
*
@ -83,34 +72,31 @@ public class I2Plistener implements Runnable {
I2PSocket sessSocket = null;
int conn = 0;
try {
die:
{
try {
serverSocket.setSoTimeout(50);
while (lives.get()) {
try {
sessSocket = serverSocket.accept();
g = true;
} catch (ConnectException ce) {
g = false;
} catch (SocketTimeoutException ste) {
g = false;
}
if (g) {
g = false;
conn++;
// toss the connection to a new thread.
I2PtoTCP conn_c = new I2PtoTCP(sessSocket, info, database, lives);
Thread t = new Thread(conn_c, Thread.currentThread().getName() + " I2PtoTCP " + conn);
t.start();
}
try {
serverSocket.setSoTimeout(50);
while (lives.get()) {
try {
sessSocket = serverSocket.accept();
g = true;
} catch (ConnectException ce) {
g = false;
} catch (SocketTimeoutException ste) {
g = false;
}
} catch (I2PException e) {
// bad shit
System.out.println("Exception " + e);
if (g) {
g = false;
conn++;
// toss the connection to a new thread.
I2PtoTCP conn_c = new I2PtoTCP(sessSocket, info, database, lives);
Thread t = new Thread(conn_c, Thread.currentThread().getName() + " I2PtoTCP " + conn);
t.start();
}
}
} catch (I2PException e) {
// bad shit
System.out.println("Exception " + e);
}
} finally {
try {

View File

@ -104,10 +104,10 @@ public class MUXlisten implements Runnable {
this.database.releaseReadLock();
this.info.releaseReadLock();
socketManager = I2PSocketManagerFactory.createManager(prikey, Q);
if (this.come_in) {
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) {
@ -141,8 +141,6 @@ public class MUXlisten implements Runnable {
this.info.add("STARTING", new Boolean(false));
this.info.releaseWriteLock();
this.database.releaseWriteLock();
// throw new Exception(e);
// Debugging, I guess.
e.printStackTrace();
throw new RuntimeException(e);
}

View File

@ -64,16 +64,6 @@ public class TCPlistener implements Runnable {
this.lives = lives;
}
private void rlock() throws Exception {
database.getReadLock();
info.getReadLock();
}
private void runlock() throws Exception {
database.releaseReadLock();
info.releaseReadLock();
}
/**
* Simply listen on TCP port, and thread connections
*
@ -81,30 +71,27 @@ public class TCPlistener implements Runnable {
public void run() {
boolean g = false;
int conn = 0;
Socket server = null;
try {
die:
{
try {
Socket server = new Socket();
listener.setSoTimeout(50); // We don't block, we cycle and check.
while (lives.get()) {
try {
server = listener.accept();
g = true;
} catch (SocketTimeoutException ste) {
g = false;
}
if (g) {
conn++;
// toss the connection to a new thread.
TCPtoI2P conn_c = new TCPtoI2P(socketManager, server, info, database, lives);
Thread t = new Thread(conn_c, Thread.currentThread().getName() + " TCPtoI2P " + conn);
t.start();
g = false;
}
try {
listener.setSoTimeout(50); // We don't block, we cycle and check.
while (lives.get()) {
try {
server = listener.accept();
g = true;
} catch (SocketTimeoutException ste) {
g = false;
}
if (g) {
conn++;
// toss the connection to a new thread.
TCPtoI2P conn_c = new TCPtoI2P(socketManager, server, info, database, lives);
Thread t = new Thread(conn_c, Thread.currentThread().getName() + " TCPtoI2P " + conn);
t.start();
g = false;
}
} catch (IOException ioe) {
}
} catch (IOException ioe) {
}
} finally {
try {

View File

@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: I2P routerconsole\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-11-01 02:59+0000\n"
"PO-Revision-Date: 2009-11-30 21:35+0100\n"
"PO-Revision-Date: 2009-12-04 22:22+0100\n"
"Last-Translator: \n"
"Language-Team: foo <foo@bar>\n"
"MIME-Version: 1.0\n"
@ -2319,7 +2319,7 @@ msgstr "L'identité unique de votre routeur est"
#: src/net/i2p/router/web/SummaryBarRenderer.java:143
msgid "never reveal it to anyone"
msgstr "révéler jamais à personne"
msgstr "ne jamais la révéler à personne"
#: src/net/i2p/router/web/SummaryBarRenderer.java:145
msgid "Local Identity"
@ -2379,15 +2379,15 @@ msgstr ""
#: src/net/i2p/router/web/SummaryBarRenderer.java:311
msgid "Bandwidth in/out"
msgstr "Bande passante entrant/sortant"
msgstr "Bande passante entrante/sortante"
#: src/net/i2p/router/web/SummaryBarRenderer.java:328
msgid "Total"
msgstr ""
msgstr "Totale"
#: src/net/i2p/router/web/SummaryBarRenderer.java:336
msgid "Used"
msgstr "Utilisé"
msgstr "Utilisée"
#: src/net/i2p/router/web/SummaryBarRenderer.java:346
msgid "Tunnels in/out"

View File

@ -1,3 +1,7 @@
2009-12-05 sponge
* BOB: fix a critical bug causing ghosts on probes
and remove unused code.
2009-12-04 zzz
* Console: Close up some possible XSS (thanks Pragmatk)
* i2psnark: Config cleanup, more HTML transitional fixes

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 25;
public final static long BUILD = 26;
/** for example "-test" */
public final static String EXTRA = "";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;