diff options
author | Mattes D <github@xoft.cz> | 2016-08-21 11:03:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-21 11:03:26 +0200 |
commit | 07c5f09ecf2fdf0d84c7cf6862c37b6cc71d4d75 (patch) | |
tree | ec3cfcf0c7f317cf5e0a2a411c9bae7ce0ec8f20 /src | |
parent | cLuaState: Added template to push multiple values in a single call. (#3331) (diff) | |
download | cuberite-07c5f09ecf2fdf0d84c7cf6862c37b6cc71d4d75.tar cuberite-07c5f09ecf2fdf0d84c7cf6862c37b6cc71d4d75.tar.gz cuberite-07c5f09ecf2fdf0d84c7cf6862c37b6cc71d4d75.tar.bz2 cuberite-07c5f09ecf2fdf0d84c7cf6862c37b6cc71d4d75.tar.lz cuberite-07c5f09ecf2fdf0d84c7cf6862c37b6cc71d4d75.tar.xz cuberite-07c5f09ecf2fdf0d84c7cf6862c37b6cc71d4d75.tar.zst cuberite-07c5f09ecf2fdf0d84c7cf6862c37b6cc71d4d75.zip |
Diffstat (limited to '')
-rw-r--r-- | src/HTTP/HTTPServer.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/HTTP/HTTPServer.cpp b/src/HTTP/HTTPServer.cpp index 5a5bee045..836dfa6e9 100644 --- a/src/HTTP/HTTPServer.cpp +++ b/src/HTTP/HTTPServer.cpp @@ -110,12 +110,12 @@ bool cHTTPServer::Initialize(void) // Notify the admin about the HTTPS / HTTP status if (m_Cert.get() == nullptr) { - LOGWARNING("WebServer: The server is running in unsecured HTTP mode."); + LOGWARNING("WebServer: The server will run in unsecured HTTP mode."); LOGINFO("Put a valid HTTPS certificate in file 'webadmin/httpscert.crt' and its corresponding private key to 'webadmin/httpskey.pem' (without any password) to enable HTTPS support"); } else { - LOGINFO("WebServer: The server is running in secure HTTPS mode."); + LOGINFO("WebServer: The server will run in secure HTTPS mode."); } return true; } @@ -129,6 +129,7 @@ bool cHTTPServer::Start(cCallbacks & a_Callbacks, const AStringVector & a_Ports) m_Callbacks = &a_Callbacks; // Open up requested ports: + AStringVector ports; for (auto port : a_Ports) { UInt16 PortNum; @@ -141,9 +142,22 @@ bool cHTTPServer::Start(cCallbacks & a_Callbacks, const AStringVector & a_Ports) if (Handle->IsListening()) { m_ServerHandles.push_back(Handle); + ports.push_back(port); } } // for port - a_Ports[] + // Inform the admin about the ports opened: + AString reportPorts; + for (const auto & port: ports) + { + if (!reportPorts.empty()) + { + reportPorts.append(", "); + } + reportPorts.append(port); + } + LOGINFO("WebAdmin is running on port(s) %s", reportPorts.c_str()); + // Report success if at least one port opened successfully: return !m_ServerHandles.empty(); } |