~ubuntu-branches/ubuntu/quantal/aria2/quantal

« back to all changes in this revision

Viewing changes to src/DHTGetPeersMessage.cc

  • Committer: Bazaar Package Importer
  • Author(s): Kartik Mistry
  • Date: 2010-11-24 12:26:31 UTC
  • mfrom: (1.6.1 upstream) (2.3.8 experimental)
  • Revision ID: james.westby@ubuntu.com-20101124122631-upujekj1ek94h3x2
Tags: 1.10.6-1
* New upstream release:
  + Fixed FTBFS on alpha arch (Closes: #590257)
  + Added IPv6 support (Closes: #448390)
* debian/patches/ftbfs_kfreebsd.diff:
  + Dropped, merged upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
  // Check to see localhost has the contents which has same infohash
71
71
  std::vector<SharedHandle<Peer> > peers;
72
72
  peerAnnounceStorage_->getPeers(peers, infoHash_);
73
 
  SharedHandle<DHTMessage> reply;
74
 
  if(peers.empty()) {
75
 
    std::vector<SharedHandle<DHTNode> > nodes;
76
 
    getRoutingTable()->getClosestKNodes(nodes, infoHash_);
77
 
    reply =
78
 
      getMessageFactory()->createGetPeersReplyMessage
79
 
      (getRemoteNode(), nodes, token, getTransactionID());
80
 
  } else {
81
 
    reply =
82
 
      getMessageFactory()->createGetPeersReplyMessage
83
 
      (getRemoteNode(), peers, token, getTransactionID());
84
 
  }
 
73
  std::vector<SharedHandle<DHTNode> > nodes;
 
74
  getRoutingTable()->getClosestKNodes(nodes, infoHash_);
 
75
  SharedHandle<DHTMessage> reply =
 
76
    getMessageFactory()->createGetPeersReplyMessage
 
77
    (getRemoteNode(), nodes, peers, token, getTransactionID());
85
78
  getMessageDispatcher()->addMessageToQueue(reply);
86
79
}
87
80