Commit 949949e9 authored by Thiago Camargo's avatar Thiago Camargo Committed by thiago

Cosmetic Changes

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6630 b35dd754-fafc-0310-a699-88a17e54d16e
parent 42ac822f
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
package org.jivesoftware.wildfire.stun; package org.jivesoftware.wildfire.stun;
import de.javawi.jstun.test.demo.StunServer; import de.javawi.jstun.test.demo.StunServer;
import org.bouncycastle.util.Strings;
import org.dom4j.DocumentHelper; import org.dom4j.DocumentHelper;
import org.dom4j.Element; import org.dom4j.Element;
import org.jivesoftware.util.JiveGlobals; import org.jivesoftware.util.JiveGlobals;
...@@ -27,12 +28,16 @@ import org.xmpp.packet.IQ; ...@@ -27,12 +28,16 @@ import org.xmpp.packet.IQ;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
import org.xmpp.packet.Packet; import org.xmpp.packet.Packet;
import org.xmpp.packet.PacketError; import org.xmpp.packet.PacketError;
import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
import java.net.InetAddress; import org.apache.mina.transport.socket.nio.SocketAcceptor;
import java.net.NetworkInterface; import org.apache.mina.common.IoAcceptor;
import java.net.SocketException; import org.apache.mina.filter.codec.textline.TextLineCodecFactory;
import java.net.UnknownHostException; import org.apache.mina.filter.codec.ProtocolCodecFilter;
import org.apache.mina.filter.LoggingFilter;
import java.net.*;
import java.util.*; import java.util.*;
import java.nio.charset.Charset;
/** /**
* STUN Server and Service Module * STUN Server and Service Module
...@@ -387,5 +392,4 @@ public class STUNService extends BasicModule implements ServerItemsProvider, Rou ...@@ -387,5 +392,4 @@ public class STUNService extends BasicModule implements ServerItemsProvider, Rou
} }
return list; return list;
} }
} }
...@@ -114,12 +114,13 @@ ...@@ -114,12 +114,13 @@
</label> </label>
<br><br> <br><br>
Session Idle Timeout (in seconds):&nbsp<input type="text" size="5" maxlength="8" name="idleTimeout" Session Idle Timeout (in seconds):&nbsp<input type="text" size="5" maxlength="8"
value="<%=mediaProxyService.getIdleTime()/1000%>" name="idleTimeout"
align="left"> value="<%=mediaProxyService.getIdleTime()/1000%>"
align="left">
<br> <br>
Port Range: Min Port Range Min:
<input type="text" size="7" maxlength="20" name="minport" <input type="text" size="7" maxlength="20" name="minport"
value="<%=mediaProxyService.getMinPort()%>"> value="<%=mediaProxyService.getMinPort()%>">
<br> <br>
...@@ -127,9 +128,11 @@ ...@@ -127,9 +128,11 @@
<input type="text" size="7" maxlength="20" name="maxport" <input type="text" size="7" maxlength="20" name="maxport"
value="<%=mediaProxyService.getMaxPort()%>"> value="<%=mediaProxyService.getMaxPort()%>">
</td> </td>
</tr> </tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr valign="middle"> <tr valign="middle">
<td width="1%" nowrap> <td width="1%" nowrap>
<input type="radio" name="enabled" value="false" id="rb01" <input type="radio" name="enabled" value="false" id="rb01"
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
stunService.initialize(XMPPServer.getInstance()); stunService.initialize(XMPPServer.getInstance());
stunService.setEnabled(enabled); stunService.setEnabled(enabled);
success = true; success = stunService.isEnabled() == enabled;
} }
%> %>
...@@ -77,8 +77,24 @@ ...@@ -77,8 +77,24 @@
</div> </div>
<br> <br>
<% } else { %>
<div class="jive-error">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td class="jive-icon"><img src="images/error-16x16.gif" width="16" height="16"
border="0"></td>
<td class="jive-icon-label">Settings not updated successfully.<br>Server not started.</td>
</tr>
</tbody>
</table>
</div>
<br>
<% } %> <% } %>
<form action="stun-settings.jsp" method="post"> <form action="stun-settings.jsp" method="post">
<fieldset> <fieldset>
<legend>STUN Server Settings</legend> <legend>STUN Server Settings</legend>
...@@ -98,18 +114,22 @@ ...@@ -98,18 +114,22 @@
<option value="<%=stunService.getPrimaryAddress()%>"><%=stunService.getPrimaryAddress()%> <option value="<%=stunService.getPrimaryAddress()%>"><%=stunService.getPrimaryAddress()%>
<% <%
List<InetAddress> addresses = stunService.getAddresses(); List<InetAddress> addresses = stunService.getAddresses();
for(InetAddress iaddress:addresses){ for(InetAddress iaddress:addresses){
%> %>
<option value="<%=iaddress.getHostAddress()%>"><%=iaddress.getHostAddress()%> <option value="<%=iaddress.getHostAddress()%>"><%=iaddress.getHostAddress()%>
</option> </option>
<% <%
} }
String sname = JiveGlobals.getProperty("xmpp.domain", JiveGlobals.getProperty("network.interface", "localhost")); String sname = JiveGlobals.getProperty("xmpp.domain", JiveGlobals.getProperty("network.interface", "localhost"));
%> %>
<option value="<%=sname%>"><%=sname%> <option value="<%=sname%>"><%=sname%>
</option> </option>
...@@ -119,7 +139,7 @@ ...@@ -119,7 +139,7 @@
<td align="left"> Secondary <td align="left"> Secondary
Address:&nbsp<select size="1" Address:&nbsp<select size="1"
maxlength="100" maxlength="100"
name="primaryAddress" name="secondaryAddress"
align="left"> align="left">
<option value="<%=stunService.getSecondaryAddress()%>"><%=stunService.getSecondaryAddress()%> <option value="<%=stunService.getSecondaryAddress()%>"><%=stunService.getSecondaryAddress()%>
</option> </option>
......
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