diff options
| author | Gavin Andresen <[email protected]> | 2011-11-14 06:56:57 -0800 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2011-11-14 06:56:57 -0800 |
| commit | 88a1b894527cf03462a50922fe2185ac53fc6c6d (patch) | |
| tree | 8961d86d99302a2ea7800000f1307c8e437c939a /src/bitcoinrpc.cpp | |
| parent | Add model null pointer check (solves issue #595 and https://github.com/laanwj... (diff) | |
| parent | Do not launch Shutdown in a new thread in case we are running the UI. (diff) | |
| download | discoin-88a1b894527cf03462a50922fe2185ac53fc6c6d.tar.xz discoin-88a1b894527cf03462a50922fe2185ac53fc6c6d.zip | |
Merge pull request #633 from laanwj/qtrpcconflict
RPC: do not launch Shutdown in a new thread in case we are running the UI
Diffstat (limited to 'src/bitcoinrpc.cpp')
| -rw-r--r-- | src/bitcoinrpc.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 6e2eac5a7..24864030c 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -160,10 +160,13 @@ Value stop(const Array& params, bool fHelp) throw runtime_error( "stop\n" "Stop bitcoin server."); - +#ifndef QT_GUI // Shutdown will take long enough that the response should get back CreateThread(Shutdown, NULL); return "bitcoin server stopping"; +#else + throw runtime_error("NYI: cannot shut down GUI with RPC command"); +#endif } @@ -2175,11 +2178,13 @@ void ThreadRPCServer2(void* parg) else if (mapArgs.count("-daemon")) strWhatAmI = strprintf(_("To use the %s option"), "\"-daemon\""); PrintConsole( - _("Warning: %s, you must set rpcpassword=<password>\nin the configuration file: %s\n" + _("Error: %s, you must set rpcpassword=<password>\nin the configuration file: %s\n" "If the file does not exist, create it with owner-readable-only file permissions.\n"), strWhatAmI.c_str(), GetConfigFile().c_str()); +#ifndef QT_GUI CreateThread(Shutdown, NULL); +#endif return; } |