forked from I2P_Developers/i2p.i2p
i2ptunnel: Fix dup tunnels clicking generate on new tunnel (ticket #2225)
remove dup call to processAction()
This commit is contained in:
@ -267,6 +267,11 @@ public class IndexBean {
|
||||
return _t("Stopping tunnel") + ' ' + getTunnelName(_tunnel) + "...";
|
||||
}
|
||||
|
||||
/**
|
||||
* Only call this ONCE! Or you will get duplicate tunnels on save.
|
||||
*
|
||||
* @return not HTML escaped, or "" if empty
|
||||
*/
|
||||
private String saveChanges() {
|
||||
// FIXME name will be HTML escaped twice
|
||||
return getMessages(_helper.saveTunnel(_tunnel, _config));
|
||||
@ -300,7 +305,7 @@ public class IndexBean {
|
||||
try {
|
||||
String result = processAction();
|
||||
if (result.length() > 0)
|
||||
buf.append(processAction()).append('\n');
|
||||
buf.append(result).append('\n');
|
||||
} catch (RuntimeException e) {
|
||||
_log.log(Log.CRIT, "Error processing " + _action, e);
|
||||
buf.append("Error: ").append(e.toString()).append('\n');
|
||||
@ -1208,12 +1213,8 @@ public class IndexBean {
|
||||
/** New key */
|
||||
private String generateNewEncryptionKey() {
|
||||
TunnelController tun = getController(_tunnel);
|
||||
Properties config = getConfig();
|
||||
if (tun == null) {
|
||||
// creating new
|
||||
tun = new TunnelController(config, "", true);
|
||||
_group.addController(tun);
|
||||
saveChanges();
|
||||
} else if (tun.getIsRunning() || tun.getIsStarting()) {
|
||||
return "Tunnel must be stopped before modifying leaseset encryption key";
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
2018-05-25 zzz
|
||||
* Console: Fix changes to wrong tunnel on /configtunnels (ticket #2227)
|
||||
* i2ptunnel: Fix dup tunnels clicking generate on new tunnel (ticket #2225)
|
||||
|
||||
2018-05-06 meeh
|
||||
* launchers:
|
||||
|
@ -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 = 10;
|
||||
public final static long BUILD = 11;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
Reference in New Issue
Block a user