From 5b2f8f036eabae5bb607b91e69f0862ec9e2a9ef Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 6 Feb 2007 14:49:22 +0000 Subject: 2007-02-06 Tatsuhiro Tsujikawa To fix the bug that causes crash on Max OS X: * src/SimpleRandomizer.h (getInstance): Create new instance if the static variable is null. * src/SimpleRandomizer.cc (randomizer): Initialized to 0. * src/BitfieldManFactory.h (getNewFactory): Removed the call to setRandomizer(). To fix the miscalculation of the range of checksum: * src/BitfieldMan.h (isBitSetOffsetRange): New function. * src/BitfieldMan.cc (isBitSetOffsetRange): New function. * src/SegmentMan.cc (tryChunkChecksumValidation): Use BitfieldMan::isBitSetOffsetRange(). Use bitfield->getBlockLength() instead of segment.segmentLength. --- src/SimpleRandomizer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SimpleRandomizer.cc') diff --git a/src/SimpleRandomizer.cc b/src/SimpleRandomizer.cc index f975aa7e..c13a5f7b 100644 --- a/src/SimpleRandomizer.cc +++ b/src/SimpleRandomizer.cc @@ -34,4 +34,4 @@ /* copyright --> */ #include "SimpleRandomizer.h" -RandomizerHandle SimpleRandomizer::randomizer = RandomizerHandle(new SimpleRandomizer()); +RandomizerHandle SimpleRandomizer::randomizer = 0; -- cgit