Commit c04203ef authored by daryl herzmann's avatar daryl herzmann Committed by GitHub

OF-1103 STUNServer plugin UI fixes (#714)

parent 8e2da200
......@@ -43,6 +43,10 @@
<h1>
STUN Server Plugin Changelog
</h1>
<p><b>1.2.1</b> -- December 19, 2016</p>
<ul>
<li>[<a href='https://issues.igniterealtime.org/browse/OF-1103'>OF-1103</a>] - UI Improvements.</li>
</ul>
<p><b>1.2.0</b> -- October 12, 2015</p>
<ul>
<li>[<a href='http://www.igniterealtime.org/issues/browse/OF-953'>OF-953</a>] - Updated JSP libraries.</li>
......
......@@ -5,8 +5,8 @@
<name>STUN server plugin</name>
<description>Adds STUN functionality to Openfire</description>
<author>Ignite Realtime</author>
<version>1.2.0</version>
<date>10/12/2015</date>
<version>1.2.1</version>
<date>12/19/2016</date>
<minServerVersion>4.0.0</minServerVersion>
<adminconsole>
......
global.add=Add
global.delete=Delete
global.save_settings=Save Settings
sidebar.stun=STUN Settings
sidebar.stun.descr=Click to view STUN settings.
......
......@@ -53,7 +53,10 @@ import de.javawi.jstun.test.demo.StunServer;
public class STUNService implements Plugin {
private static final Logger Log = LoggerFactory.getLogger(STUNService.class);
public static final String STUN_ADDRESS_PRIMARY = "stun.address.primary";
public static final String STUN_ADDRESS_SECONDARY = "stun.address.secondary";
public static final String STUN_PORT_PRIMARY = "stun.port.primary";
public static final String STUN_PORT_SECONDARY = "stun.port.secondary";
private static final String ELEMENT_NAME = "stun";
private static final String NAMESPACE = "google:jingleinfo";
private static final String DEFAULT_EXTERNAL_ADDRESSES =
......@@ -77,8 +80,8 @@ public class STUNService implements Plugin {
public void initializePlugin(PluginManager manager, File pluginDirectory) {
this.enabled = JiveGlobals.getBooleanProperty("stun.enabled", true);
primaryAddress = JiveGlobals.getProperty("stun.address.primary");
secondaryAddress = JiveGlobals.getProperty("stun.address.secondary");
primaryAddress = JiveGlobals.getProperty(STUN_ADDRESS_PRIMARY);
secondaryAddress = JiveGlobals.getProperty(STUN_ADDRESS_SECONDARY);
String addresses = JiveGlobals.getProperty("stun.external.addresses");
// If no custom external addresses are defined, use the defaults.
......@@ -87,8 +90,8 @@ public class STUNService implements Plugin {
}
externalServers = getStunServerAddresses(addresses);
primaryPort = JiveGlobals.getIntProperty("stun.port.primary", 3478);
secondaryPort = JiveGlobals.getIntProperty("stun.port.secondary", 3479);
primaryPort = JiveGlobals.getIntProperty(STUN_PORT_PRIMARY, 3478);
secondaryPort = JiveGlobals.getIntProperty(STUN_PORT_SECONDARY, 3479);
this.localEnabled = JiveGlobals.getBooleanProperty("stun.local.enabled", false);
// If the local server is supposed to be enabled, ensure that primary and secondary
......@@ -117,6 +120,14 @@ public class STUNService implements Plugin {
}
} else if (property.equals("stun.local.enabled")) {
localEnabled = JiveGlobals.getBooleanProperty("stun.local.enabled", false);
} else if (property.equals(STUN_ADDRESS_PRIMARY)) {
primaryAddress = JiveGlobals.getProperty(STUN_ADDRESS_PRIMARY);
} else if (property.equals(STUN_ADDRESS_SECONDARY)) {
secondaryAddress = JiveGlobals.getProperty(STUN_ADDRESS_SECONDARY);
} else if (property.equals(STUN_PORT_PRIMARY)) {
primaryPort = JiveGlobals.getIntProperty(STUN_PORT_PRIMARY, 3478);
} else if (property.equals(STUN_PORT_SECONDARY)) {
secondaryPort = JiveGlobals.getIntProperty(STUN_PORT_SECONDARY, 3479);
}
}
......@@ -435,4 +446,4 @@ public class STUNService implements Plugin {
return new IQHandlerInfo(ELEMENT_NAME, NAMESPACE);
}
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment