2006-07-01 Complication

* Ensure that the I2PTunnel web interface won't update tunnel settings
      for shared clients when a non-shared client is modified
      (thanks for spotting, BarkerJr!)
This commit is contained in:
complication
2006-07-01 22:44:34 +00:00
committed by zzz
parent f0a424a93f
commit 3d07205c9d
3 changed files with 27 additions and 14 deletions

View File

@ -190,6 +190,7 @@ public class IndexBean {
}
private String saveChanges() {
// Get current tunnel controller
TunnelController cur = getController(_tunnel);
Properties config = getConfig();
@ -205,21 +206,28 @@ public class IndexBean {
} else {
cur.setConfig(config, "");
}
if ("ircclient".equals(cur.getType()) ||
"httpclient".equals(cur.getType()) ||
"client".equals(cur.getType())) {
// all clients use the same I2CP session, and as such, use the same
// I2CP options
// Only modify other shared tunnels
// if the current tunnel is shared, and of supported type
if ("true".equalsIgnoreCase(cur.getSharedClient()) &&
("ircclient".equals(cur.getType()) ||
"httpclient".equals(cur.getType()) ||
"client".equals(cur.getType()))) {
// all clients use the same I2CP session, and as such, use the same I2CP options
List controllers = _group.getControllers();
for (int i = 0; i < controllers.size(); i++) {
TunnelController c = (TunnelController)controllers.get(i);
// Current tunnel modified by user, skip
if (c == cur) continue;
//only change when they really are declared of beeing a sharedClient
if (("httpclient".equals(c.getType()) ||
"ircclient".equals(c.getType())||
"client".equals(c.getType())
) && "true".equalsIgnoreCase(c.getSharedClient())) {
// Only modify this non-current tunnel
// if it belongs to a shared destination, and is of supported type
if ("true".equalsIgnoreCase(c.getSharedClient()) &&
("httpclient".equals(c.getType()) ||
"ircclient".equals(c.getType()) ||
"client".equals(c.getType()))) {
Properties cOpt = c.getConfig("");
if (_tunnelQuantity != null) {
cOpt.setProperty("option.inbound.quantity", _tunnelQuantity);

View File

@ -1,4 +1,9 @@
$Id: history.txt,v 1.489 2006-06-13 21:17:40 jrandom Exp $
$Id: history.txt,v 1.490 2006-06-14 00:24:35 cervantes Exp $
2006-07-01 Complication
* Ensure that the I2PTunnel web interface won't update tunnel settings
for shared clients when a non-shared client is modified
(thanks for spotting, BarkerJr!)
2006-06-14 cervantes
* Small tweak to I2PTunnel CSS, so it looks better with desktops

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.428 $ $Date: 2006-06-13 18:29:55 $";
public final static String ID = "$Revision: 1.429 $ $Date: 2006-06-13 21:17:48 $";
public final static String VERSION = "0.6.1.21";
public final static long BUILD = 0;
public final static long BUILD = 1;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);