Skip to content

Commit 4ed7308

Browse files
committed
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-
1 parent b312579 commit 4ed7308

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/httpserver.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,26 +292,26 @@ static bool ThreadHTTP(struct event_base* base)
292292
/** Bind HTTP server to specified addresses */
293293
static bool HTTPBindAddresses(struct evhttp* http)
294294
{
295-
int defaultPort = gArgs.GetArg("-rpcport", BaseParams().RPCPort());
295+
int http_port = gArgs.GetArg("-rpcport", BaseParams().RPCPort());
296296
std::vector<std::pair<std::string, uint16_t> > endpoints;
297297

298298
// Determine what addresses to bind to
299299
if (!gArgs.IsArgSet("-rpcallowip")) { // Default to loopback if not allowing external IPs
300-
endpoints.push_back(std::make_pair("::1", defaultPort));
301-
endpoints.push_back(std::make_pair("127.0.0.1", defaultPort));
300+
endpoints.push_back(std::make_pair("::1", http_port));
301+
endpoints.push_back(std::make_pair("127.0.0.1", http_port));
302302
if (gArgs.IsArgSet("-rpcbind")) {
303303
LogPrintf("WARNING: option -rpcbind was ignored because -rpcallowip was not specified, refusing to allow everyone to connect\n");
304304
}
305305
} else if (gArgs.IsArgSet("-rpcbind")) { // Specific bind address
306306
for (const std::string& strRPCBind : gArgs.GetArgs("-rpcbind")) {
307-
int port = defaultPort;
307+
int port = http_port;
308308
std::string host;
309309
SplitHostPort(strRPCBind, port, host);
310310
endpoints.push_back(std::make_pair(host, port));
311311
}
312312
} else { // No specific bind address specified, bind to any
313-
endpoints.push_back(std::make_pair("::", defaultPort));
314-
endpoints.push_back(std::make_pair("0.0.0.0", defaultPort));
313+
endpoints.push_back(std::make_pair("::", http_port));
314+
endpoints.push_back(std::make_pair("0.0.0.0", http_port));
315315
}
316316

317317
// Bind addresses

0 commit comments

Comments
 (0)