- i2np.ntcp.autoip=true redefined to enable inbound only if

SSU reachability is OK. i2np.ntcp.autoip=always for the old behavior.
  autoip default is now "true".
  i2np.ntcp.hostname=xxx now trumps i2np.tcp.autoip.
- SSU always tells NTCP when status changes.
This commit is contained in:
zzz
2009-04-30 21:03:00 +00:00
parent 5b44bcb44f
commit b21e011203
5 changed files with 49 additions and 32 deletions

View File

@ -114,10 +114,13 @@ public class ConfigNetHelper extends HelperBase {
return DISABLED;
String hostname = _context.getProperty(PROP_I2NP_NTCP_HOSTNAME);
boolean specified = hostname != null && hostname.length() > 0;
boolean auto = Boolean.valueOf(_context.getProperty(PROP_I2NP_NTCP_AUTO_IP)).booleanValue();
if ((mode == 0 && (!specified) && !auto) ||
(mode == 1 && specified && !auto) ||
(mode == 2 && auto))
String auto = _context.getProperty(PROP_I2NP_NTCP_AUTO_IP);
if (auto == null)
auto = "false";
if ((mode == 0 && (!specified) && auto.equals("false")) ||
(mode == 1 && specified && auto.equals("false")) ||
(mode == 2 && auto.equals("true")) ||
(mode == 3 && auto.equals("always")))
return CHECKED;
return "";
}