* Console:

- config.jsp now cause graceful restart
    * UPnP:
      - Tweak to help startup problems
   * UDP:
      - Only save IP when it changes
This commit is contained in:
zzz
2009-05-28 13:49:57 +00:00
parent 665b691711
commit 65ae9138ef
4 changed files with 29 additions and 15 deletions

View File

@@ -30,7 +30,7 @@ public class UPnPManager {
private RouterContext _context;
private UPnP _upnp;
private UPnPCallback _upnpCallback;
private boolean _isRunning;
private volatile boolean _isRunning;
private InetAddress _detectedAddress;
private TransportManager _manager;
/**

View File

@@ -477,9 +477,12 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
// queue a country code lookup of the new IP
_context.commSystem().queueLookup(ourIP);
// store these for laptop-mode (change ident on restart... or every time... when IP changes)
_context.router().setConfigSetting(PROP_IP, _externalListenHost.getHostAddress());
_context.router().setConfigSetting(PROP_IP_CHANGE, "" + _context.clock().now());
_context.router().saveConfig();
String oldIP = _context.getProperty(PROP_IP);
if (!_externalListenHost.getHostAddress().equals(oldIP)) {
_context.router().setConfigSetting(PROP_IP, _externalListenHost.getHostAddress());
_context.router().setConfigSetting(PROP_IP_CHANGE, "" + _context.clock().now());
_context.router().saveConfig();
}
_context.router().rebuildRouterInfo();
}
_testEvent.forceRun();