Commit 27ffe224 authored by Daryl Herzmann's avatar Daryl Herzmann Committed by akrherz

Remove chance of having duplicate security audit entry for a noop

when updating the database profiling. JM-1451


git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@11073 b35dd754-fafc-0310-a699-88a17e54d16e
parent 0651691b
...@@ -49,12 +49,12 @@ ...@@ -49,12 +49,12 @@
} }
// Enable/disable stats // Enable/disable stats
if ("true".equals(enableStats)) { if ("true".equals(enableStats) && ! DbConnectionManager.isProfilingEnabled()) {
DbConnectionManager.setProfilingEnabled(true); DbConnectionManager.setProfilingEnabled(true);
// Log the event // Log the event
webManager.logEvent("enabled db profiling", null); webManager.logEvent("enabled db profiling", null);
} }
else if ("false".equals(enableStats)) { else if ("false".equals(enableStats) && DbConnectionManager.isProfilingEnabled()) {
DbConnectionManager.setProfilingEnabled(false); DbConnectionManager.setProfilingEnabled(false);
// Log the event // Log the event
webManager.logEvent("disabled db profiling", null); webManager.logEvent("disabled db profiling", null);
......
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