/* */ #include "TrackerWatcherCommand.h" #include "SleepCommand.h" #include "TrackerInitCommand.h" TrackerWatcherCommand::TrackerWatcherCommand(int cuid, Request* req, TorrentDownloadEngine* e): Command(cuid), req(req), e(e) {} TrackerWatcherCommand::~TrackerWatcherCommand() {} bool TrackerWatcherCommand::execute() { Command* command = new TrackerInitCommand(e->torrentMan->getNewCuid(), req, e); e->logger->info("CUID#%d - creating new tracker request command #%d", cuid, command->getCuid()); e->commands.push(command); SleepCommand* slpCommand = new SleepCommand(cuid, e, this, e->torrentMan->minInterval); e->commands.push(slpCommand); return false; }