aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorJorge Timón <jtimon@jtimon.cc>2017-05-07 18:54:43 +0200
committerJorge Timón <jtimon@jtimon.cc>2017-05-09 21:29:05 +0200
commitb3cbd554d90815725988f3810929f2450702a717 (patch)
tree65e089bc1414db8d16c21a22d415e9e70ad49b2f /src/httpserver.cpp
parentf2957ce6cd2c9f67580f5e0ba2519b0f3c8799d7 (diff)
scripted-diff: Util: Encapsulate mapMultiArgs behind gArgs
-BEGIN VERIFY SCRIPT- sed -i 's/mapMultiArgs.count(/gArgs.IsArgSet(/g' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; sed -i 's/mapMultiArgs.at("/gArgs.GetArgs("/g' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index e7df23295d..6d1d7ac774 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -196,8 +196,8 @@ static bool InitHTTPAllowList()
LookupHost("::1", localv6, false);
rpc_allow_subnets.push_back(CSubNet(localv4, 8)); // always allow IPv4 local subnet
rpc_allow_subnets.push_back(CSubNet(localv6)); // always allow IPv6 localhost
- if (mapMultiArgs.count("-rpcallowip")) {
- const std::vector<std::string>& vAllow = mapMultiArgs.at("-rpcallowip");
+ if (gArgs.IsArgSet("-rpcallowip")) {
+ const std::vector<std::string>& vAllow = gArgs.GetArgs("-rpcallowip");
for (std::string strAllow : vAllow) {
CSubNet subnet;
LookupSubNet(strAllow.c_str(), subnet);
@@ -321,8 +321,8 @@ static bool HTTPBindAddresses(struct evhttp* http)
if (IsArgSet("-rpcbind")) {
LogPrintf("WARNING: option -rpcbind was ignored because -rpcallowip was not specified, refusing to allow everyone to connect\n");
}
- } else if (mapMultiArgs.count("-rpcbind")) { // Specific bind address
- const std::vector<std::string>& vbind = mapMultiArgs.at("-rpcbind");
+ } else if (gArgs.IsArgSet("-rpcbind")) { // Specific bind address
+ const std::vector<std::string>& vbind = gArgs.GetArgs("-rpcbind");
for (std::vector<std::string>::const_iterator i = vbind.begin(); i != vbind.end(); ++i) {
int port = defaultPort;
std::string host;