Commit 23bda9cf authored by toaster's avatar toaster
Browse files

fix auditperiod bug in configctx, fix possible bug in throttled inputstream for one byte read

git-svn-id: https://subversion.umiacs.umd.edu/ace/trunk@142 f1b3a171-7291-4a19-a512-95ad0ad9394a
parent 6ceaa382
......@@ -35,6 +35,7 @@ import edu.umiacs.ace.driver.StorageDriver;
import edu.umiacs.ace.driver.StorageDriverFactory;
import edu.umiacs.ace.util.PersistUtil;
import edu.umiacs.ace.monitor.core.Collection;
import edu.umiacs.ace.monitor.core.ConfigConstants;
import edu.umiacs.ace.monitor.core.MonitoredItem;
import edu.umiacs.util.Strings;
import java.util.List;
......@@ -169,7 +170,7 @@ public final class AuditConfigurationContext implements ServletContextListener {
for ( Collection c : items ) {
StorageDriver sa;
int checkperiod = SettingsUtil.getInt(c, PARAM_IMS, 0);
int checkperiod = SettingsUtil.getInt(c, ConfigConstants.ATTR_AUDIT_PERIOD, 0);
if ( checkperiod < 1 ) {
LOG.trace("Skipping auditing for collection: " + c.getName()
+ " check period: " + checkperiod);
......
......@@ -56,7 +56,9 @@ public class ThrottledInputStream extends FilterInputStream {
@Override
public int read() throws IOException {
read(oneByte, 0, 1);
int result = read(oneByte, 0, 1);
if (result == -1)
return -1;
return oneByte[0];
}
......
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