diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-11-05 13:18:32 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-11-05 13:18:35 +0100 |
commit | 15a219ff8eaed23acb31fcf2ef54b55bd22ee3e8 (patch) | |
tree | 9b25e391b3a2b99d8ecfa9dd8eb4f141b9572b13 /src/httpserver.cpp | |
parent | 46eb2755d456ca736c1cb7a0922bfece63c5151e (diff) | |
parent | 4ed730802f9ec3d65477a29a318dd78216ef7085 (diff) |
Merge #14628: Trivial: Rename misleading 'defaultPort' to 'rpc_port'
4ed730802f9ec3d65477a29a318dd78216ef7085 scripted-diff: Rename misleading 'defaultPort' to 'http_port' (Murray Nesbitt)
Pull request description:
`defaultPort` in `HTTPBindAddresses()` is misleadingly named. `defaultPort ` suggests a constant, not something that might be overridden by `-rpcport`.
Tree-SHA512: f6ae8bdc2b4a4f503e44df9efdec32c854d2dede87714399f53791d50cce6bc41c46b01d1583cfc0e3e4777c244e1c74443fa39d9da50a45e53af265b74a17d1
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r-- | src/httpserver.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp index dcb9e0ccd2..60e7b917d0 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 |