summaryrefslogtreecommitdiff
path: root/src/RequestGroupEntry.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-07-05 15:14:00 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-07-05 15:14:00 +0000
commite52e0fa01f6ab8fc0f3a8c7574be8468948b3bd0 (patch)
treed02d57aaf707bc1a7abbf2581a57b68285b406f3 /src/RequestGroupEntry.h
parent800bc3a6c31ce811a73626a66b29a6337d07cd7b (diff)
Fixed invalid connection count
Diffstat (limited to 'src/RequestGroupEntry.h')
-rw-r--r--src/RequestGroupEntry.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/RequestGroupEntry.h b/src/RequestGroupEntry.h
index 58689357..a294d7fc 100644
--- a/src/RequestGroupEntry.h
+++ b/src/RequestGroupEntry.h
@@ -47,16 +47,23 @@ protected:
RequestHandle _currentRequest;
RequestGroup* _requestGroup;
DownloadCommand* _nextDownloadCommand;
+ bool _shouldAddNumConnection;
public:
RequestGroupEntry(int cuid,
const RequestHandle& currentRequest,
- RequestGroup* requestGroup):
+ RequestGroup* requestGroup,
+ DownloadCommand* nextDownloadCommand = 0):
_cuid(cuid),
_currentRequest(currentRequest),
_requestGroup(requestGroup),
- _nextDownloadCommand(0)
+ _nextDownloadCommand(nextDownloadCommand)
{
- ++_requestGroup->numConnection;
+ if(nextDownloadCommand) {
+ _shouldAddNumConnection = false;
+ } else {
+ _shouldAddNumConnection = true;
+ ++_requestGroup->numConnection;
+ }
}
virtual ~RequestGroupEntry();
@@ -80,12 +87,12 @@ public:
{
return _requestGroup;
}
-
+ /*
void setNextDownloadCommand(DownloadCommand* command)
{
_nextDownloadCommand = command;
}
-
+ */
DownloadCommand* getNextDownloadCommand() const
{
return _nextDownloadCommand;