2009-05-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Avoid circular reference between RequestGroup and
	AdaptiveURISelector
	* src/RequestGroupMan.cc
	* src/AdaptiveURISelector.cc
	* src/AdaptiveURISelector.h
pull/1/head
Tatsuhiro Tsujikawa 2009-05-01 14:01:32 +00:00
parent a8b05c3c1a
commit d0b485cba0
4 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2009-05-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Avoid circular reference between RequestGroup and AdaptiveURISelector
* src/RequestGroupMan.cc
* src/AdaptiveURISelector.cc
* src/AdaptiveURISelector.h
2009-04-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
* Release 1.3.2

View File

@ -61,8 +61,7 @@ namespace aria2 {
*/
AdaptiveURISelector::AdaptiveURISelector
(const SharedHandle<ServerStatMan>& serverStatMan,
const SharedHandle<RequestGroup>& requestGroup):
(const SharedHandle<ServerStatMan>& serverStatMan, RequestGroup* requestGroup):
_serverStatMan(serverStatMan),
_requestGroup(requestGroup),
_nbConnections(1),

View File

@ -48,7 +48,8 @@ class Logger;
class AdaptiveURISelector:public URISelector {
private:
SharedHandle<ServerStatMan> _serverStatMan;
SharedHandle<RequestGroup> _requestGroup;
// No need to delete _requestGroup
RequestGroup* _requestGroup;
unsigned int _nbServerToEvaluate;
unsigned int _nbConnections;
@ -73,7 +74,7 @@ private:
std::string getBestMirror(const std::deque<std::string>& uris) const;
public:
AdaptiveURISelector(const SharedHandle<ServerStatMan>& serverStatMan,
const SharedHandle<RequestGroup>& requestGroup);
RequestGroup* requestGroup);
virtual ~AdaptiveURISelector();

View File

@ -286,7 +286,7 @@ void RequestGroupMan::configureRequestGroup
} else if(uriSelectorValue == V_ADAPTIVE) {
requestGroup->setURISelector
(SharedHandle<URISelector>(new AdaptiveURISelector(_serverStatMan,
requestGroup)));
requestGroup.get())));
}
}