2009-06-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Added _xmlRpc member variable to RequestGroupMan to reduce the
	number of call Option::getAsBool(PREF_ENABLE_XML_RPC)	
	* src/RequestGroupMan.cc
	* src/RequestGroupMan.h
pull/1/head
Tatsuhiro Tsujikawa 2009-06-20 03:19:23 +00:00
parent 572f10af72
commit 0b9c5a9165
3 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2009-06-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added _xmlRpc member variable to RequestGroupMan to reduce the
number of call Option::getAsBool(PREF_ENABLE_XML_RPC)
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
2009-06-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Call setStatus(STATUS_ONESHOT_REALTIME) from constructor. Call

View File

@ -80,13 +80,14 @@ RequestGroupMan::RequestGroupMan(const RequestGroups& requestGroups,
_serverStatMan(new ServerStatMan()),
_maxOverallDownloadSpeedLimit
(option->getAsInt(PREF_MAX_OVERALL_DOWNLOAD_LIMIT)),
_maxOverallUploadSpeedLimit(option->getAsInt(PREF_MAX_OVERALL_UPLOAD_LIMIT))
_maxOverallUploadSpeedLimit(option->getAsInt(PREF_MAX_OVERALL_UPLOAD_LIMIT)),
_xmlRpc(option->getAsBool(PREF_ENABLE_XML_RPC))
{}
bool RequestGroupMan::downloadFinished()
{
#ifdef ENABLE_XML_RPC
if(_option->getAsBool(PREF_ENABLE_XML_RPC)) {
if(_xmlRpc) {
return false;
}
#endif // ENABLE_XML_RPC

View File

@ -73,6 +73,9 @@ private:
unsigned int _maxOverallUploadSpeedLimit;
// truf if XML-RPC is enabled.
bool _xmlRpc;
std::string
formatDownloadResult(const std::string& status,
const SharedHandle<DownloadResult>& downloadResult) const;