diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-06-25 23:35:24 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-06-25 23:35:24 +0900 |
| commit | 1b874268a067b4aba0e329768b82df635d7cae17 (patch) | |
| tree | f72263f15286a6c3372d87571c261789ff8c87f7 /src/HttpRequest.cc | |
| parent | 4b03634f36b05c32737aeea8ca178f53f68052e8 (diff) | |
Use int64_t instead of off_t
Some classes such as DiskAdaptor, DiskWriter, FileAllocationIterator
and ChecksumValidator are left unchanged.
Diffstat (limited to 'src/HttpRequest.cc')
| -rw-r--r-- | src/HttpRequest.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index beba1b67..104a02a9 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -75,7 +75,7 @@ void HttpRequest::setRequest(const SharedHandle<Request>& request) request_ = request; } -off_t HttpRequest::getStartByte() const +int64_t HttpRequest::getStartByte() const { if(!segment_) { return 0; @@ -84,15 +84,15 @@ off_t HttpRequest::getStartByte() const } } -off_t HttpRequest::getEndByte() const +int64_t HttpRequest::getEndByte() const { if(!segment_ || !request_) { return 0; } else { if(request_->isPipeliningEnabled()) { - off_t endByte = + int64_t endByte = fileEntry_->gtoloff(segment_->getPosition()+segment_->getLength()-1); - return std::min(endByte, static_cast<off_t>(fileEntry_->getLength()-1)); + return std::min(endByte, fileEntry_->getLength()-1); } else { return 0; } @@ -367,7 +367,7 @@ const SharedHandle<AuthConfig>& HttpRequest::getAuthConfig() const return authConfig_; } -off_t HttpRequest::getEntityLength() const +int64_t HttpRequest::getEntityLength() const { assert(fileEntry_); return fileEntry_->getLength(); |
