diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-06-03 23:22:18 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-06-03 23:41:30 +0900 |
| commit | adeead6f0396e2f8551d1182972e277728fd6c8b (patch) | |
| tree | 828d2bada55257dc0df1fa4a50f20d556177d83b /src/HttpDownloadCommand.cc | |
| parent | 83f4bced07909fb553c11c860816aa6db3de9615 (diff) | |
Revert to existing "proper" coding style
The rule is simple: don't try to change the coding style of the
existing codebase.
Diffstat (limited to 'src/HttpDownloadCommand.cc')
| -rw-r--r-- | src/HttpDownloadCommand.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/HttpDownloadCommand.cc b/src/HttpDownloadCommand.cc index db57aa12..c668f77d 100644 --- a/src/HttpDownloadCommand.cc +++ b/src/HttpDownloadCommand.cc @@ -93,13 +93,13 @@ bool HttpDownloadCommand::prepareForNextSegment() if (getRequest()->isPipeliningEnabled() || (getRequest()->isKeepAliveEnabled() && ( - // Make sure that all filters are finished to pool socket - (!util::endsWith(streamFilterName, SinkStreamFilter::NAME) && + // Make sure that all filters are finished to pool socket + (!util::endsWith(streamFilterName, SinkStreamFilter::NAME) && getStreamFilter()->finished()) || - getRequestEndOffset() == - getFileEntry()->gtoloff(getSegments().front()->getPositionToWrite()) - ) - ) + getRequestEndOffset() == + getFileEntry()->gtoloff(getSegments().front()->getPositionToWrite()) + ) + ) ) { // TODO What if server sends EOF when non-SinkStreamFilter is // used and server didn't send Connection: close? We end up to @@ -120,9 +120,9 @@ bool HttpDownloadCommand::prepareForNextSegment() !downloadFinished) { const std::shared_ptr<Segment>& segment = getSegments().front(); - int64_t lastOffset =getFileEntry()->gtoloff( - std::min(segment->getPosition()+segment->getLength(), - getFileEntry()->getLastOffset())); + int64_t lastOffset =getFileEntry()->gtoloff + (std::min(segment->getPosition()+segment->getLength(), + getFileEntry()->getLastOffset())); auto range = httpResponse_->getHttpHeader()->getRange(); if (lastOffset == range.endByte + 1) { return prepareForRetry(0); |
