2004-11-05 jrandom
* Bugfixes and unit tests for the SAM bridge to handle quoted message parameters, verify proper operation after multiple session lifetimes, as well as some synchronization problems. * New properties method on the DataHelper class. * Address a race on fast disconnecting clients
This commit is contained in:
@ -598,6 +598,10 @@ public class JobQueue {
|
||||
for (int i = 0; states != null && i < states.length; i++)
|
||||
str.append(states[i]).append(" ");
|
||||
str.append(" -->\n");
|
||||
str.append("<!-- jobs: ");
|
||||
for (int i = 0; i < activeJobs.size(); i++)
|
||||
str.append(activeJobs.get(i).toString()).append(" ");
|
||||
str.append("-->\n");
|
||||
out.write(str.toString());
|
||||
out.flush();
|
||||
|
||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.67 $ $Date: 2004/11/02 03:27:56 $";
|
||||
public final static String ID = "$Revision: 1.68 $ $Date: 2004/11/02 06:57:08 $";
|
||||
public final static String VERSION = "0.4.1.3";
|
||||
public final static long BUILD = 8;
|
||||
public final static long BUILD = 9;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@ -134,7 +134,7 @@ class ClientTunnelPoolManagerJob extends JobImpl {
|
||||
// this aint good 'nuff...
|
||||
continue;
|
||||
}
|
||||
boolean ok = _tunnelPool.allocateTunnel(id, _clientPool.getDestination());
|
||||
boolean ok = _tunnelPool.allocateTunnel(id, _clientPool);
|
||||
if (ok) {
|
||||
allocated++;
|
||||
}
|
||||
|
@ -175,23 +175,25 @@ class TunnelPool {
|
||||
* @return true if the tunnel was allocated successfully, false if an error occurred
|
||||
*/
|
||||
public boolean allocateTunnel(TunnelId id, Destination dest) {
|
||||
return allocateTunnel(id, getClientPool(dest));
|
||||
}
|
||||
public boolean allocateTunnel(TunnelId id, ClientTunnelPool pool) {
|
||||
if (!_isLive) return false;
|
||||
ClientTunnelPool pool = getClientPool(dest);
|
||||
if (pool == null) {
|
||||
if (_log.shouldLog(Log.ERROR))
|
||||
_log.error("Error allocating tunnel " + id + " to " + dest + ": no pool for the client known");
|
||||
_log.error("Error allocating tunnel " + id + " to " + pool.getDestination() + ": no pool for the client known");
|
||||
return false;
|
||||
}
|
||||
TunnelInfo tunnel = removeFreeTunnel(id);
|
||||
if (tunnel == null) {
|
||||
if (_log.shouldLog(Log.ERROR))
|
||||
_log.error("Error allocating tunnel " + id + " to " + dest + ": tunnel is no longer free?");
|
||||
_log.error("Error allocating tunnel " + id + " to " + pool.getDestination() + ": tunnel is no longer free?");
|
||||
return false;
|
||||
}
|
||||
|
||||
TunnelInfo t = tunnel;
|
||||
while (t != null) {
|
||||
t.setDestination(dest);
|
||||
t.setDestination(pool.getDestination());
|
||||
t = t.getNextHopInfo();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user