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

Added "amChoking" and "peerChoking" key in getPeers response.
	* src/XmlRpcMethodImpl.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-05-12 15:29:51 +00:00
parent c43e26c2a9
commit 626fa15c5e
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-05-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added "amChoking" and "peerChoking" key in getPeers response.
* src/XmlRpcMethodImpl.cc
2009-05-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added test case for zero-length filter.

View File

@ -208,6 +208,8 @@ static void gatherPeer(BDE& peers, const SharedHandle<PeerStorage>& ps)
peerEntry["port"] = Util::uitos((*i)->port);
peerEntry["bitfield"] = Util::toHex((*i)->getBitfield(),
(*i)->getBitfieldLength());
peerEntry["amChoking"] = (*i)->amChoking()?BDE("true"):BDE("false");
peerEntry["peerChoking"] = (*i)->peerChoking()?BDE("true"):BDE("false");
peers << peerEntry;
}
}