summaryrefslogtreecommitdiff
path: root/src/TorrentAutoSaveCommand.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/TorrentAutoSaveCommand.cc')
-rw-r--r--src/TorrentAutoSaveCommand.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/TorrentAutoSaveCommand.cc b/src/TorrentAutoSaveCommand.cc
index 5d2154c3..b363e3ca 100644
--- a/src/TorrentAutoSaveCommand.cc
+++ b/src/TorrentAutoSaveCommand.cc
@@ -35,15 +35,21 @@
#include "TorrentAutoSaveCommand.h"
#include "Util.h"
-TorrentAutoSaveCommand::TorrentAutoSaveCommand(int cuid, TorrentDownloadEngine* e, int interval):Command(cuid), e(e), interval(interval) {}
+TorrentAutoSaveCommand::TorrentAutoSaveCommand(int cuid,
+ TorrentDownloadEngine* e,
+ const BtContextHandle& btContext,
+ int interval):
+ BtContextAwareCommand(cuid, btContext),
+ e(e),
+ interval(interval) {}
TorrentAutoSaveCommand::~TorrentAutoSaveCommand() {}
bool TorrentAutoSaveCommand::execute() {
- if(checkPoint.elapsed(interval) || e->torrentMan->isHalt()) {
+ if(checkPoint.elapsed(interval) || btRuntime->isHalt()) {
checkPoint.reset();
- e->torrentMan->save();
- if(e->torrentMan->isHalt()) {
+ btProgressInfoFile->save();
+ if(btRuntime->isHalt()) {
return true;
}
}