mirror of
https://github.com/aria2/aria2.git
synced 2025-04-06 05:57:36 +03:00
2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed SharedHandle::isNull(). Instead we added operator* and operator unspecified_bool_type. Removed use of WeakHandle and replaced with raw pointer.
This commit is contained in:
parent
f6f5a7e5ee
commit
93e5dbed32
181 changed files with 911 additions and 876 deletions
|
@ -105,18 +105,17 @@ void DHTGetPeersMessageTest::testDoReceivedAction()
|
|||
DHTRoutingTable routingTable(localNode);
|
||||
|
||||
DHTGetPeersMessage msg(localNode, remoteNode, infoHash, transactionID);
|
||||
msg.setRoutingTable(WeakHandle<DHTRoutingTable>(&routingTable));
|
||||
msg.setTokenTracker(WeakHandle<DHTTokenTracker>(&tokenTracker));
|
||||
msg.setMessageDispatcher(WeakHandle<DHTMessageDispatcher>(&dispatcher));
|
||||
msg.setMessageFactory(WeakHandle<DHTMessageFactory>(&factory));
|
||||
msg.setRoutingTable(&routingTable);
|
||||
msg.setTokenTracker(&tokenTracker);
|
||||
msg.setMessageDispatcher(&dispatcher);
|
||||
msg.setMessageFactory(&factory);
|
||||
{
|
||||
// localhost has peer contact information for that infohash.
|
||||
DHTPeerAnnounceStorage peerAnnounceStorage;
|
||||
peerAnnounceStorage.addPeerAnnounce(infoHash, "192.168.0.100", 6888);
|
||||
peerAnnounceStorage.addPeerAnnounce(infoHash, "192.168.0.101", 6889);
|
||||
|
||||
msg.setPeerAnnounceStorage(WeakHandle<DHTPeerAnnounceStorage>
|
||||
(&peerAnnounceStorage));
|
||||
msg.setPeerAnnounceStorage(&peerAnnounceStorage);
|
||||
|
||||
msg.doReceivedAction();
|
||||
|
||||
|
@ -150,10 +149,8 @@ void DHTGetPeersMessageTest::testDoReceivedAction()
|
|||
SharedHandle<DHTNode> returnNode1(new DHTNode());
|
||||
routingTable.addNode(returnNode1);
|
||||
|
||||
msg.setPeerAnnounceStorage(WeakHandle<DHTPeerAnnounceStorage>
|
||||
(&peerAnnounceStorage));
|
||||
msg.setRoutingTable(WeakHandle<DHTRoutingTable>
|
||||
(&routingTable));
|
||||
msg.setPeerAnnounceStorage(&peerAnnounceStorage);
|
||||
msg.setRoutingTable(&routingTable);
|
||||
|
||||
msg.doReceivedAction();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue