mirror of https://github.com/aria2/aria2
2010-03-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that value of numSeeders in aria2.tellStatus XML-RPC method response is integer, while manual says it is string. When peer's port is not listening port, set '0' to port in aria2.getPeers response. * src/XmlRpcMethodImpl.ccpull/1/head
parent
e0335dcd4f
commit
d6860e11bf
|
@ -1,3 +1,11 @@
|
|||
2010-03-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Fixed the bug that value of numSeeders in aria2.tellStatus XML-RPC
|
||||
method response is integer, while manual says it is string. When
|
||||
peer's port is not listening port, set '0' to port in
|
||||
aria2.getPeers response.
|
||||
* src/XmlRpcMethodImpl.cc
|
||||
|
||||
2010-03-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Lines starting "#" in -i list are treated as comments.
|
||||
|
|
|
@ -463,7 +463,8 @@ static void gatherProgressBitTorrent
|
|||
|
||||
std::vector<SharedHandle<Peer> > peers;
|
||||
peerStorage->getActivePeers(peers);
|
||||
entryDict[KEY_NUM_SEEDERS] = countSeeder(peers.begin(), peers.end());
|
||||
entryDict[KEY_NUM_SEEDERS] =
|
||||
util::uitos(countSeeder(peers.begin(), peers.end()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -477,7 +478,11 @@ static void gatherPeer(BDE& peers, const SharedHandle<PeerStorage>& ps)
|
|||
peerEntry[KEY_PEER_ID] = util::torrentPercentEncode((*i)->getPeerId(),
|
||||
PEER_ID_LENGTH);
|
||||
peerEntry[KEY_IP] = (*i)->ipaddr;
|
||||
if((*i)->isIncomingPeer()) {
|
||||
peerEntry[KEY_PORT] = std::string("0");
|
||||
} else {
|
||||
peerEntry[KEY_PORT] = util::uitos((*i)->port);
|
||||
}
|
||||
peerEntry[KEY_BITFIELD] = util::toHex((*i)->getBitfield(),
|
||||
(*i)->getBitfieldLength());
|
||||
peerEntry[KEY_AM_CHOKING] = (*i)->amChoking()?BDE_TRUE:BDE_FALSE;
|
||||
|
|
Loading…
Reference in New Issue