2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Call Command::transitStatus() before calling Command::execute(),
	so that the status change made in execute() is not cleared.
	* src/DownloadEngine.cc
pull/1/head
Tatsuhiro Tsujikawa 2008-05-09 14:36:06 +00:00
parent 95e0fbfd7b
commit 0b5e827ead
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Call Command::transitStatus() before calling Command::execute(),
so that the status change made in execute() is not cleared.
* src/DownloadEngine.cc
2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed forward declaration of SocketCore class. Removed forward declaration of SocketCore class.

View File

@ -117,10 +117,9 @@ static void executeCommand(std::deque<Command*>& commands,
Command* com = commands.front(); Command* com = commands.front();
commands.pop_front(); commands.pop_front();
if(com->statusMatch(statusFilter)) { if(com->statusMatch(statusFilter)) {
com->transitStatus();
if(com->execute()) { if(com->execute()) {
delete com; delete com;
} else {
com->transitStatus();
} }
} else { } else {
commands.push_back(com); commands.push_back(com);