remove GetBoolArg() fDefault parameter defaulting to false

- explicitly set the default of all GetBoolArg() calls
- rework getarg_test.cpp and util_tests.cpp to cover this change
- some indentation fixes
- move macdockiconhandler.h include in bitcoin.cpp to the "our headers"
  section
This commit is contained in:
Philip Kaufmann
2013-04-28 17:37:50 +02:00
parent 3d661110da
commit 3260b4c090
10 changed files with 61 additions and 76 deletions

View File

@@ -757,7 +757,7 @@ void StartRPCThreads()
rpc_io_service = new asio::io_service();
rpc_ssl_context = new ssl::context(*rpc_io_service, ssl::context::sslv23);
const bool fUseSSL = GetBoolArg("-rpcssl");
const bool fUseSSL = GetBoolArg("-rpcssl", false);
if (fUseSSL)
{
@@ -1037,7 +1037,7 @@ json_spirit::Value CRPCTable::execute(const std::string &strMethod, const json_s
// Observe safe mode
string strWarning = GetWarnings("rpc");
if (strWarning != "" && !GetBoolArg("-disablesafemode") &&
if (strWarning != "" && !GetBoolArg("-disablesafemode", false) &&
!pcmd->okSafeMode)
throw JSONRPCError(RPC_FORBIDDEN_BY_SAFE_MODE, string("Safe mode: ") + strWarning);
@@ -1071,7 +1071,7 @@ Object CallRPC(const string& strMethod, const Array& params)
GetConfigFile().string().c_str()));
// Connect to localhost
bool fUseSSL = GetBoolArg("-rpcssl");
bool fUseSSL = GetBoolArg("-rpcssl", false);
asio::io_service io_service;
ssl::context context(io_service, ssl::context::sslv23);
context.set_options(ssl::context::no_sslv2);