Commit 8776b51a authored by Alex Wenckus's avatar Alex Wenckus Committed by alex

Admin settings interface now completly functional for enabling and disabling.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/branches@5773 b35dd754-fafc-0310-a699-88a17e54d16e
parent 50c39cf8
......@@ -19,24 +19,28 @@
Map<String, String> errorMap = new HashMap<String, String>();
if (request.getParameter("update") != null) {
boolean httpPortsDistinct = ParamUtils.getBooleanParameter(request, "httpPortsDistinct",
false);
int requestedPort;
int requestedSecurePort;
if (httpPortsDistinct) {
requestedPort = ParamUtils.getIntParameter(request, "port", -1);
requestedSecurePort = ParamUtils.getIntParameter(request, "securePort", -1);
}
else {
requestedPort = serverManager.getAdminUnsecurePort();
requestedSecurePort = serverManager.getAdminSecurePort();
}
try {
serverManager.setHttpBindPorts(requestedPort, requestedSecurePort);
}
catch (Exception e) {
errorMap.put("port", e.getMessage());
boolean isEnabled = ParamUtils.getBooleanParameter(request, "httpBindEnabled");
if (isEnabled) {
boolean httpPortsDistinct = ParamUtils.getBooleanParameter(request, "httpPortsDistinct",
false);
int requestedPort;
int requestedSecurePort;
if (httpPortsDistinct) {
requestedPort = ParamUtils.getIntParameter(request, "port", -1);
requestedSecurePort = ParamUtils.getIntParameter(request, "securePort", -1);
}
else {
requestedPort = serverManager.getAdminUnsecurePort();
requestedSecurePort = serverManager.getAdminSecurePort();
}
try {
serverManager.setHttpBindPorts(requestedPort, requestedSecurePort);
}
catch (Exception e) {
errorMap.put("port", e.getMessage());
}
}
serverManager.setHttpBindEnabled(isEnabled);
}
boolean isHttpBindEnabled = serverManager.isHttpBindEnabled();
......
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