2009-04-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Code cleanup
	* src/DownloadCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-04-17 14:55:18 +00:00
parent 65a358c68b
commit a883a4aecc
2 changed files with 10 additions and 16 deletions

View File

@ -1,3 +1,8 @@
2009-04-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Code cleanup
* src/DownloadCommand.cc
2009-04-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed segmentation fault when GZipDecoder::decode() returns 0

View File

@ -172,22 +172,11 @@ bool DownloadCommand::executeInternal() {
!socket->wantRead() && !socket->wantWrite()) {
segmentComplete = true;
}
} else if(!_transferEncodingDecoder.isNull() &&
!_contentEncodingDecoder.isNull()) {
if(_transferEncodingDecoder->finished() &&
_contentEncodingDecoder->finished()) {
segmentComplete = true;
}
} else if(!_transferEncodingDecoder.isNull() &&
_contentEncodingDecoder.isNull()) {
if(_transferEncodingDecoder->finished()) {
segmentComplete = true;
}
} else if(_transferEncodingDecoder.isNull() &&
!_contentEncodingDecoder.isNull()) {
if(_contentEncodingDecoder->finished()) {
segmentComplete = true;
}
} else if((_transferEncodingDecoder.isNull() ||
_transferEncodingDecoder->finished()) &&
(_contentEncodingDecoder.isNull() ||
_contentEncodingDecoder->finished())) {
segmentComplete = true;
}
if(!segmentComplete && bufSize == 0 &&