mirror of https://github.com/aria2/aria2
2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made `begin' unsigned int. * src/GrowSegment.h * src/Piece.cc * src/Piece.h * src/PiecedSegment.cc * src/PiecedSegment.h * src/Segment.hpull/1/head
parent
7d63daed22
commit
ba158dbfc1
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Made `begin' unsigned int.
|
||||||
|
* src/GrowSegment.h
|
||||||
|
* src/Piece.cc
|
||||||
|
* src/Piece.h
|
||||||
|
* src/PiecedSegment.cc
|
||||||
|
* src/PiecedSegment.h
|
||||||
|
* src/Segment.h
|
||||||
|
|
||||||
2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Calculate piece hash when data is arrived if the data is arrived in
|
Calculate piece hash when data is arrived if the data is arrived in
|
||||||
|
|
|
@ -92,7 +92,7 @@ public:
|
||||||
|
|
||||||
#ifdef ENABLE_MESSAGE_DIGEST
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
|
|
||||||
virtual bool updateHash(size_t begin,
|
virtual bool updateHash(uint32_t begin,
|
||||||
const unsigned char* data, size_t dataLength)
|
const unsigned char* data, size_t dataLength)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -225,7 +225,7 @@ void Piece::setHashAlgo(const std::string& algo)
|
||||||
_hashAlgo = algo;
|
_hashAlgo = algo;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Piece::updateHash(size_t begin, const unsigned char* data, size_t dataLength)
|
bool Piece::updateHash(uint32_t begin, const unsigned char* data, size_t dataLength)
|
||||||
{
|
{
|
||||||
if(_hashAlgo.empty()) {
|
if(_hashAlgo.empty()) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -140,7 +140,7 @@ public:
|
||||||
// Updates hash value. This function compares begin and private variable
|
// Updates hash value. This function compares begin and private variable
|
||||||
// _nextBegin and only when they are equal, hash is updated eating data and
|
// _nextBegin and only when they are equal, hash is updated eating data and
|
||||||
// returns true. Otherwise returns false.
|
// returns true. Otherwise returns false.
|
||||||
bool updateHash(size_t begin, const unsigned char* data, size_t dataLength);
|
bool updateHash(uint32_t begin, const unsigned char* data, size_t dataLength);
|
||||||
|
|
||||||
bool isHashCalculated() const;
|
bool isHashCalculated() const;
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ void PiecedSegment::updateWrittenLength(size_t bytes)
|
||||||
|
|
||||||
#ifdef ENABLE_MESSAGE_DIGEST
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
|
|
||||||
bool PiecedSegment::updateHash(size_t begin,
|
bool PiecedSegment::updateHash(uint32_t begin,
|
||||||
const unsigned char* data, size_t dataLength)
|
const unsigned char* data, size_t dataLength)
|
||||||
{
|
{
|
||||||
return _piece->updateHash(begin, data, dataLength);
|
return _piece->updateHash(begin, data, dataLength);
|
||||||
|
|
|
@ -85,7 +85,7 @@ public:
|
||||||
#ifdef ENABLE_MESSAGE_DIGEST
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
|
|
||||||
// `begin' is a offset inside this segment.
|
// `begin' is a offset inside this segment.
|
||||||
virtual bool updateHash(size_t begin,
|
virtual bool updateHash(uint32_t begin,
|
||||||
const unsigned char* data, size_t dataLength);
|
const unsigned char* data, size_t dataLength);
|
||||||
|
|
||||||
virtual bool isHashCalculated() const;
|
virtual bool isHashCalculated() const;
|
||||||
|
|
|
@ -71,7 +71,7 @@ public:
|
||||||
#ifdef ENABLE_MESSAGE_DIGEST
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
|
|
||||||
// `begin' is a offset inside this segment.
|
// `begin' is a offset inside this segment.
|
||||||
virtual bool updateHash(size_t begin,
|
virtual bool updateHash(uint32_t begin,
|
||||||
const unsigned char* data, size_t dataLength) = 0;
|
const unsigned char* data, size_t dataLength) = 0;
|
||||||
|
|
||||||
virtual bool isHashCalculated() const = 0;
|
virtual bool isHashCalculated() const = 0;
|
||||||
|
|
Loading…
Reference in New Issue