2009-11-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Added --bt-max-peers option to changeOption XML-RPC method.
	* src/XmlRpcMethod.cc
	* src/XmlRpcMethodImpl.cc
	* test/XmlRpcMethodTest.cc
This commit is contained in:
Tatsuhiro Tsujikawa 2009-11-27 13:07:08 +00:00
parent 58f4e715e0
commit a8d4fbad51
4 changed files with 42 additions and 7 deletions

View file

@ -600,6 +600,14 @@ BDE ChangeOptionXmlRpcMethod::process
if(option->defined(PREF_MAX_UPLOAD_LIMIT)) {
group->setMaxUploadSpeedLimit(option->getAsInt(PREF_MAX_UPLOAD_LIMIT));
}
#ifdef ENABLE_BITTORRENT
BtObject btObject = e->getBtRegistry()->get(group->getGID());
if(!btObject.isNull()) {
if(option->defined(PREF_BT_MAX_PEERS)) {
btObject._btRuntime->setMaxPeers(option->getAsInt(PREF_BT_MAX_PEERS));
}
}
#endif // ENABLE_BITTORRENT
}
return BDE_OK;
}