diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-03-31 15:08:25 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-04-04 09:37:26 +0200 |
commit | 5a60b66a9d2a9e7a9dda269d6ee4a2fe6d01a354 (patch) | |
tree | b13684cf912cc785335c7595eaceeb6400a190da /src | |
parent | 7cfbe1fee465e82ddbdc8ed17dfcce791bd765f5 (diff) |
Use a messagebox to display the error when -server is provided without providing a rpc password
Diffstat (limited to 'src')
-rw-r--r-- | src/bitcoinrpc.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index e511505c1d..eb2f04f1d9 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -2362,16 +2362,17 @@ void ThreadRPCServer2(void* parg) strWhatAmI = strprintf(_("To use the %s option"), "\"-server\""); else if (mapArgs.count("-daemon")) strWhatAmI = strprintf(_("To use the %s option"), "\"-daemon\""); - std::string strMessage = _("%s, you must set a rpcpassword in the configuration file:\n %s\n" - "It is recommended you use the following random password:\n" - "rpcuser=bitcoinrpc\n" - "rpcpassword=%s\n" - "(you do not need to remember this password)\n" - "If the file does not exist, create it with owner-readable-only file permissions.\n"); - fprintf(stderr, strMessage.c_str(), + ThreadSafeMessageBox(strprintf( + _("%s, you must set a rpcpassword in the configuration file:\n %s\n" + "It is recommended you use the following random password:\n" + "rpcuser=bitcoinrpc\n" + "rpcpassword=%s\n" + "(you do not need to remember this password)\n" + "If the file does not exist, create it with owner-readable-only file permissions.\n"), strWhatAmI.c_str(), GetConfigFile().c_str(), - EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()); + EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()), + _("Error"), wxOK | wxMODAL); QueueShutdown(); return; } |