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