From 0b5e827ead424ff0a5de43bc707b52abb4badfcb Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 9 May 2008 14:36:06 +0000 Subject: [PATCH] 2008-05-09 Tatsuhiro Tsujikawa Call Command::transitStatus() before calling Command::execute(), so that the status change made in execute() is not cleared. * src/DownloadEngine.cc --- ChangeLog | 6 ++++++ src/DownloadEngine.cc | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cdbd0194..237dd7bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-09 Tatsuhiro Tsujikawa + + 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 Removed forward declaration of SocketCore class. diff --git a/src/DownloadEngine.cc b/src/DownloadEngine.cc index 6f8475ab..e2c42ed8 100644 --- a/src/DownloadEngine.cc +++ b/src/DownloadEngine.cc @@ -117,10 +117,9 @@ static void executeCommand(std::deque& commands, Command* com = commands.front(); commands.pop_front(); if(com->statusMatch(statusFilter)) { + com->transitStatus(); if(com->execute()) { delete com; - } else { - com->transitStatus(); } } else { commands.push_back(com);