(163 . 13)(163 . 9)
5 throw runtime_error(
6 "stop\n"
7 "Stop bitcoin server.");
8 #ifndef QT_GUI
9 // Shutdown will take long enough that the response should get back
10 CreateThread(Shutdown, NULL);
11 return "bitcoin server stopping";
12 #else
13 throw runtime_error("NYI: cannot shut down GUI with RPC command");
14 #endif
15 }
16
17
(1552 . 11)(1548 . 6)
19 if (pwalletMain->IsCrypted())
20 throw JSONRPCError(-15, "Error: running with an encrypted wallet, but encryptwallet was called.");
21
22 #ifdef QT_GUI
23 // shutting down via RPC while the GUI is running does not work (yet):
24 throw runtime_error("Not Yet Implemented: use GUI to encrypt wallet, not RPC command");
25 #endif
26
27 // TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string)
28 // Alternately, find a way to make params[0] mlock()'d to begin with.
29 SecureString strWalletPass;
(2184 . 9)(2175 . 7)
31 strWhatAmI.c_str(),
32 GetConfigFile().c_str(),
33 EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str());
34 #ifndef QT_GUI
35 CreateThread(Shutdown, NULL);
36 #endif
37 return;
38 }
39