aboutsummaryrefslogtreecommitdiff
path: root/src/httprpc.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-12-27 10:11:21 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2016-12-27 10:17:11 -0800
commit7aa700424cbda387536373d8dfec88aee43f950e (patch)
tree866140c4737995ac77ac7ccefcb78f8b3cc2e353 /src/httprpc.cpp
parentdbc8a8c86ae50059fddb2d6834fa5f0c9bbf9b71 (diff)
parentc2f61bebb190258753714b29ab2041e80651cec9 (diff)
Merge #9243: Clean up mapArgs and mapMultiArgs Usage
c2f61be Add a ForceSetArg method for testing (Matt Corallo) 4e04814 Lock mapArgs/mapMultiArgs access in util (Matt Corallo) 4cd373a Un-expose mapArgs from utils.h (Matt Corallo) 71fde55 Get rid of mapArgs direct access in ZMQ construction (Matt Corallo) 0cf86a6 Introduce (and use) an IsArgSet accessor method (Matt Corallo) 2b5f085 Fix non-const mapMultiArgs[] access after init. (Matt Corallo) c8042a4 Remove arguments to ParseConfigFile (Matt Corallo)
Diffstat (limited to 'src/httprpc.cpp')
-rw-r--r--src/httprpc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/httprpc.cpp b/src/httprpc.cpp
index e35acb6cd9..970ce2db73 100644
--- a/src/httprpc.cpp
+++ b/src/httprpc.cpp
@@ -95,7 +95,7 @@ static bool multiUserAuthorized(std::string strUserPass)
if (mapMultiArgs.count("-rpcauth") > 0) {
//Search for multi-user login/pass "rpcauth" from config
- BOOST_FOREACH(std::string strRPCAuth, mapMultiArgs["-rpcauth"])
+ BOOST_FOREACH(std::string strRPCAuth, mapMultiArgs.at("-rpcauth"))
{
std::vector<std::string> vFields;
boost::split(vFields, strRPCAuth, boost::is_any_of(":$"));
@@ -215,7 +215,7 @@ static bool HTTPReq_JSONRPC(HTTPRequest* req, const std::string &)
static bool InitRPCAuthentication()
{
- if (mapArgs["-rpcpassword"] == "")
+ if (GetArg("-rpcpassword", "") == "")
{
LogPrintf("No rpcpassword set - using random cookie authentication\n");
if (!GenerateAuthCookie(&strRPCUserColonPass)) {
@@ -226,7 +226,7 @@ static bool InitRPCAuthentication()
}
} else {
LogPrintf("Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation.\n");
- strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"];
+ strRPCUserColonPass = GetArg("-rpcuser", "") + ":" + GetArg("-rpcpassword", "");
}
return true;
}