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 @@
package org.jivesoftware.wildfire.stun;
import de.javawi.jstun.test.demo.StunServer;
import org.bouncycastle.util.Strings;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.jivesoftware.util.JiveGlobals;
......@@ -27,12 +28,16 @@ import org.xmpp.packet.IQ;
import org.xmpp.packet.JID;
import org.xmpp.packet.Packet;
import org.xmpp.packet.PacketError;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
import org.apache.mina.transport.socket.nio.SocketAcceptor;
import org.apache.mina.common.IoAcceptor;
import org.apache.mina.filter.codec.textline.TextLineCodecFactory;
import org.apache.mina.filter.codec.ProtocolCodecFilter;
import org.apache.mina.filter.LoggingFilter;
import java.net.*;
import java.util.*;
import java.nio.charset.Charset;
/**
* STUN Server and Service Module
......@@ -387,5 +392,4 @@ public class STUNService extends BasicModule implements ServerItemsProvider, Rou
}
return list;
}
}
......@@ -114,12 +114,13 @@
</label>
<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"
name="idleTimeout"
value="<%=mediaProxyService.getIdleTime()/1000%>"
align="left">
<br>
Port Range: Min
Port Range Min:
<input type="text" size="7" maxlength="20" name="minport"
value="<%=mediaProxyService.getMinPort()%>">
<br>
......@@ -127,9 +128,11 @@
<input type="text" size="7" maxlength="20" name="maxport"
value="<%=mediaProxyService.getMaxPort()%>">
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr valign="middle">
<td width="1%" nowrap>
<input type="radio" name="enabled" value="false" id="rb01"
......
......@@ -47,7 +47,7 @@
stunService.initialize(XMPPServer.getInstance());
stunService.setEnabled(enabled);
success = true;
success = stunService.isEnabled() == enabled;
}
%>
......@@ -77,8 +77,24 @@
</div>
<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">
<fieldset>
<legend>STUN Server Settings</legend>
......@@ -98,18 +114,22 @@
<option value="<%=stunService.getPrimaryAddress()%>"><%=stunService.getPrimaryAddress()%>
<%
List<InetAddress> addresses = stunService.getAddresses();
for(InetAddress iaddress:addresses){
%>
<option value="<%=iaddress.getHostAddress()%>"><%=iaddress.getHostAddress()%>
</option>
<%
}
String sname = JiveGlobals.getProperty("xmpp.domain", JiveGlobals.getProperty("network.interface", "localhost"));
%>
<option value="<%=sname%>"><%=sname%>
</option>
......@@ -119,7 +139,7 @@
<td align="left"> Secondary
Address:&nbsp<select size="1"
maxlength="100"
name="primaryAddress"
name="secondaryAddress"
align="left">
<option value="<%=stunService.getSecondaryAddress()%>"><%=stunService.getSecondaryAddress()%>
</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