linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #00902
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2131: see bug #550300, this is http://launchpadlibrarian.net/42307173/tthcorruption_bm.patch
------------------------------------------------------------
revno: 2131
committer: cologic <ne5@xxxxxxxxxxx>
branch nick: dcplusplus
timestamp: Fri 2010-04-23 14:40:39 -0400
message:
see bug #550300, this is http://launchpadlibrarian.net/42307173/tthcorruption_bm.patch
modified:
dcpp/DownloadManager.cpp
dcpp/FilteredFile.h
dcpp/Transfer.h
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/DownloadManager.cpp'
--- dcpp/DownloadManager.cpp 2010-02-11 21:44:13 +0000
+++ dcpp/DownloadManager.cpp 2010-04-23 18:40:39 +0000
@@ -326,6 +326,7 @@
try {
d->getFile()->flush();
} catch(const FileException& e) {
+ d->resetPos();
failDownload(aSource, e.getError());
return;
}
=== modified file 'dcpp/FilteredFile.h'
--- dcpp/FilteredFile.h 2010-02-11 21:44:13 +0000
+++ dcpp/FilteredFile.h 2010-04-23 18:40:39 +0000
@@ -138,7 +138,6 @@
if(len > 0) {
throw Exception("Garbage data after end of stream");
}
- flushed = true;
return written;
}
}
=== modified file 'dcpp/Transfer.h'
--- dcpp/Transfer.h 2010-02-11 21:44:13 +0000
+++ dcpp/Transfer.h 2010-04-23 18:40:39 +0000
@@ -50,6 +50,8 @@
int64_t getStartPos() const { return getSegment().getStart(); }
+ void resetPos() { pos = getStartPos(); }
+
void addPos(int64_t aBytes, int64_t aActual) { pos += aBytes; actual+= aActual; }
enum { MIN_SAMPLES = 15, MIN_SECS = 15 };