diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-07-21 23:42:41 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-07-21 23:42:41 +0900 |
| commit | c58f736bb91f55fb68151c5c7d977911f993b1ab (patch) | |
| tree | 98dda8e77c825244f4d43cacc9951c7deaed2666 /src/DHTTaskFactoryImpl.cc | |
| parent | f0cd83f809ea679ab035f5827dba93a3ee25c59b (diff) | |
BtRegistry now holds BitTorrent TCP server port.
Because BitTorrent TCP server port is global configuration, it is not
preferable that per download resource BtRuntime holds it. We also
refactored and eliminated ugly static variable in PeerListenCommand.
If TCP port is necessary, we inject it to them directly.
Diffstat (limited to 'src/DHTTaskFactoryImpl.cc')
| -rw-r--r-- | src/DHTTaskFactoryImpl.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/DHTTaskFactoryImpl.cc b/src/DHTTaskFactoryImpl.cc index d4488560..efc9afc3 100644 --- a/src/DHTTaskFactoryImpl.cc +++ b/src/DHTTaskFactoryImpl.cc @@ -46,7 +46,6 @@ #include "Peer.h" #include "DHTNodeLookupEntry.h" #include "PeerStorage.h" -#include "BtRuntime.h" #include "DHTMessageCallback.h" namespace aria2 { @@ -90,12 +89,11 @@ DHTTaskFactoryImpl::createBucketRefreshTask() SharedHandle<DHTTask> DHTTaskFactoryImpl::createPeerLookupTask (const SharedHandle<DownloadContext>& ctx, - const SharedHandle<BtRuntime>& btRuntime, + uint16_t tcpPort, const SharedHandle<PeerStorage>& peerStorage) { - SharedHandle<DHTPeerLookupTask> task(new DHTPeerLookupTask(ctx)); - // TODO these may be not freed by RequestGroup::releaseRuntimeResource() - task->setBtRuntime(btRuntime); + SharedHandle<DHTPeerLookupTask> task(new DHTPeerLookupTask(ctx, tcpPort)); + // TODO this may be not freed by RequestGroup::releaseRuntimeResource() task->setPeerStorage(peerStorage); setCommonProperty(task); return task; |
