From 2ff7628d654f08d295e5b24894597b2a42940cb5 Mon Sep 17 00:00:00 2001 From: oy Date: Fri, 17 Jun 2016 10:04:24 +0200 Subject: [PATCH] skip automatic password generation in case initialization fails --- src/engine/server/server.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index baeac6242..1baa8d65e 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -1645,7 +1645,6 @@ void CServer::ConchainRconPasswordSet(IConsole::IResult *pResult, void *pUserDat pfnCallback(pResult, pCallbackUserData); if(pResult->NumArguments() >= 1) { - dbg_msg("dbg", "huh?"); static_cast(pUserData)->m_RconPasswordSet = 1; } } @@ -1730,10 +1729,11 @@ int main(int argc, const char **argv) // ignore_convention } } + bool SkipPWGen = false; if(secure_random_init() != 0) { dbg_msg("secure", "could not initialize secure RNG"); - return -1; + SkipPWGen = true; // skip automatic password generation } CServer *pServer = CreateServer(); @@ -1792,7 +1792,8 @@ int main(int argc, const char **argv) // ignore_convention pEngine->InitLogfile(); - pServer->InitRconPasswordIfUnset(); + if(!SkipPWGen) + pServer->InitRconPasswordIfUnset(); // run the server dbg_msg("server", "starting...");