* UDP: Fix a bug from a blank i2np.udp.host config

causing frequent RouterInfo updates and incorrect
      addition of introducers, caused by config.jsp handling
This commit is contained in:
zzz
2010-06-02 18:20:13 +00:00
parent c5ea51beec
commit 7cf0aad388
4 changed files with 17 additions and 4 deletions

View File

@ -145,7 +145,10 @@ public class ConfigNetHandler extends FormHandler {
}
_context.router().setConfigSetting(UDPTransport.PROP_SOURCES, _udpAutoIP);
// Todo: Catch local IPs right here rather than complaining later
_context.router().setConfigSetting(UDPTransport.PROP_EXTERNAL_HOST, uhost);
if (uhost.length() > 0)
_context.router().setConfigSetting(UDPTransport.PROP_EXTERNAL_HOST, uhost);
else
_context.router().removeConfigSetting(UDPTransport.PROP_EXTERNAL_HOST);
if ((!oldUdp.equals(_udpAutoIP)) || (!oldUHost.equals(uhost))) {
addFormNotice(_("Updating IP address"));
restartRequired = true;