summaryrefslogtreecommitdiff
path: root/src/HttpResponseCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-03-05 06:32:01 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-03-05 06:32:01 +0000
commit8d980589e3d9affbb874cf09e53a0f51a46784f4 (patch)
tree4b0f6f089657d3fab07b4fa77efb70bc8f7ed53d /src/HttpResponseCommand.cc
parent0276b3bb379e3fdfe448762700a70542f58f2709 (diff)
Diffstat (limited to 'src/HttpResponseCommand.cc')
-rw-r--r--src/HttpResponseCommand.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc
index 30e65db1..fd2526b8 100644
--- a/src/HttpResponseCommand.cc
+++ b/src/HttpResponseCommand.cc
@@ -37,7 +37,7 @@ HttpResponseCommand::~HttpResponseCommand() {
}
bool HttpResponseCommand::executeInternal(Segment seg) {
- if(SEGMENT_EQUAL(req->seg, seg) == false) {
+ if(req->seg.sp != seg.sp) {
e->logger->info(MSG_SEGMENT_CHANGED, cuid);
return prepareForRetry(0);
}
@@ -104,6 +104,8 @@ bool HttpResponseCommand::handleDefaultEncoding(const HttpHeader& headers) {
return prepareForRetry(0);
} else {
e->segmentMan->totalSize = size;
+ Segment seg;
+ e->segmentMan->getSegment(seg, cuid);
e->diskWriter->initAndOpenFile(e->segmentMan->getFilePath());
createHttpDownloadCommand();
return true;