2010-04-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Changed error message.
	* src/XmlRpcMethod.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-04-03 04:31:37 +00:00
parent 3139b5fe48
commit a49c853297
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2010-04-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Changed error message.
* src/XmlRpcMethod.cc
2010-04-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2010-04-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added bt-tracker-timeout, bt-tracker-connect-timeout, Added bt-tracker-timeout, bt-tracker-connect-timeout,

View File

@ -80,16 +80,17 @@ XmlRpcResponse XmlRpcMethod::execute
template<typename InputIterator> template<typename InputIterator>
static void gatherOption static void gatherOption
(InputIterator first, InputIterator last, (InputIterator first, InputIterator last,
const std::set<std::string>& changeableOptions, const std::set<std::string>& allowedOptions,
const SharedHandle<Option>& option, const SharedHandle<Option>& option,
const SharedHandle<OptionParser>& optionParser) const SharedHandle<OptionParser>& optionParser)
{ {
for(; first != last; ++first) { for(; first != last; ++first) {
const std::string& optionName = (*first).first; const std::string& optionName = (*first).first;
if(changeableOptions.count(optionName) == 0) { if(allowedOptions.count(optionName) == 0) {
throw DL_ABORT_EX throw DL_ABORT_EX
(StringFormat (StringFormat
("%s cannot be changed or unknown option.", optionName.c_str()).str()); ("%s option cannot be used in this context.",
optionName.c_str()).str());
} else { } else {
SharedHandle<OptionHandler> optionHandler = SharedHandle<OptionHandler> optionHandler =
optionParser->findByName(optionName); optionParser->findByName(optionName);