Skip to content

Commit

Permalink
whoopsiedaisy
Browse files Browse the repository at this point in the history
  • Loading branch information
asmuth committed Feb 25, 2013
1 parent 56d137a commit 9aa1430
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fnordmetric-enterprise/src/SwapFile.scala
Expand Up @@ -75,23 +75,23 @@ class SwapFile(metric_key: MetricKey) {
file.synchronized {
file.seek(position - chunk_size)

read_pos += file.read(buffer.array, read_pos,
read_pos += file.read(chunk.array, read_pos,
chunk_size - read_pos - 1)
}
}

read_pos = chunk_size - BLOCK_SIZE

while (read_pos >= 0) {
buffer.position(read_pos)
chunk.position(read_pos)

if (buffer.getShort != 0x1717) {
if (chunk.getShort != 0x1717) {
FnordMetric.error("file corrupted: " + file_name, false)
return position - chunk_size
}

dst += ((buffer.getLong,
java.lang.Double.longBitsToDouble(buffer.getLong)))
dst += ((chunk.getLong,
java.lang.Double.longBitsToDouble(chunk.getLong)))

read_pos -= BLOCK_SIZE
}
Expand Down

0 comments on commit 9aa1430

Please sign in to comment.