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 @@ ...@@ -19,24 +19,28 @@
Map<String, String> errorMap = new HashMap<String, String>(); Map<String, String> errorMap = new HashMap<String, String>();
if (request.getParameter("update") != null) { if (request.getParameter("update") != null) {
boolean httpPortsDistinct = ParamUtils.getBooleanParameter(request, "httpPortsDistinct", boolean isEnabled = ParamUtils.getBooleanParameter(request, "httpBindEnabled");
false); if (isEnabled) {
int requestedPort; boolean httpPortsDistinct = ParamUtils.getBooleanParameter(request, "httpPortsDistinct",
int requestedSecurePort; false);
if (httpPortsDistinct) { int requestedPort;
requestedPort = ParamUtils.getIntParameter(request, "port", -1); int requestedSecurePort;
requestedSecurePort = ParamUtils.getIntParameter(request, "securePort", -1); if (httpPortsDistinct) {
} requestedPort = ParamUtils.getIntParameter(request, "port", -1);
else { requestedSecurePort = ParamUtils.getIntParameter(request, "securePort", -1);
requestedPort = serverManager.getAdminUnsecurePort(); }
requestedSecurePort = serverManager.getAdminSecurePort(); else {
} requestedPort = serverManager.getAdminUnsecurePort();
try { requestedSecurePort = serverManager.getAdminSecurePort();
serverManager.setHttpBindPorts(requestedPort, requestedSecurePort); }
} try {
catch (Exception e) { serverManager.setHttpBindPorts(requestedPort, requestedSecurePort);
errorMap.put("port", e.getMessage()); }
catch (Exception e) {
errorMap.put("port", e.getMessage());
}
} }
serverManager.setHttpBindEnabled(isEnabled);
} }
boolean isHttpBindEnabled = serverManager.isHttpBindEnabled(); 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