aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorMurray Nesbitt <github@nesbitt.ca>2018-11-01 02:19:55 -0700
committerMurray Nesbitt <github@nesbitt.ca>2018-11-05 04:01:47 -0800
commit4ed730802f9ec3d65477a29a318dd78216ef7085 (patch)
tree5adda1f90219308f2f5ffca355d5832a1f743b1a /src/httpserver.cpp
parentb312579c69f10f23f62934b8f860cef89c2ffe87 (diff)
downloadbitcoin-4ed730802f9ec3d65477a29a318dd78216ef7085.tar.xz
scripted-diff: Rename misleading 'defaultPort' to 'http_port'
-BEGIN VERIFY SCRIPT- sed -i -e 's/\<defaultPort\>/http_port/g' src/httpserver.cpp -END VERIFY SCRIPT-
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index c29f7a4375..3e4a060bcc 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -292,26 +292,26 @@ static bool ThreadHTTP(struct event_base* base)
/** Bind HTTP server to specified addresses */
static bool HTTPBindAddresses(struct evhttp* http)
{
- int defaultPort = gArgs.GetArg("-rpcport", BaseParams().RPCPort());
+ int http_port = gArgs.GetArg("-rpcport", BaseParams().RPCPort());
std::vector<std::pair<std::string, uint16_t> > endpoints;
// Determine what addresses to bind to
if (!gArgs.IsArgSet("-rpcallowip")) { // Default to loopback if not allowing external IPs
- endpoints.push_back(std::make_pair("::1", defaultPort));
- endpoints.push_back(std::make_pair("127.0.0.1", defaultPort));
+ endpoints.push_back(std::make_pair("::1", http_port));
+ endpoints.push_back(std::make_pair("127.0.0.1", http_port));
if (gArgs.IsArgSet("-rpcbind")) {
LogPrintf("WARNING: option -rpcbind was ignored because -rpcallowip was not specified, refusing to allow everyone to connect\n");
}
} else if (gArgs.IsArgSet("-rpcbind")) { // Specific bind address
for (const std::string& strRPCBind : gArgs.GetArgs("-rpcbind")) {
- int port = defaultPort;
+ int port = http_port;
std::string host;
SplitHostPort(strRPCBind, port, host);
endpoints.push_back(std::make_pair(host, port));
}
} else { // No specific bind address specified, bind to any
- endpoints.push_back(std::make_pair("::", defaultPort));
- endpoints.push_back(std::make_pair("0.0.0.0", defaultPort));
+ endpoints.push_back(std::make_pair("::", http_port));
+ endpoints.push_back(std::make_pair("0.0.0.0", http_port));
}
// Bind addresses