src/*.exe
src/bitcoin
src/bitcoind
+ src/test_bitcoin
+src/build.h
.*.swp
*.*~*
*.bak
throw runtime_error(
"stop\n"
"Stop bitcoin server.");
-#ifndef QT_GUI
// Shutdown will take long enough that the response should get back
- QueueShutdown();
- // NOTE: This should actually work with Bitcoin-Qt too now, but 0.6.0 didn't allow it
+ StartShutdown();
return "bitcoin server stopping";
-#else
- throw runtime_error("NYI: cannot shut down GUI with RPC command");
-#endif
}
"(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(),
+ GetConfigFile().string().c_str(),
EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()),
_("Error"), wxOK | wxMODAL);
- QueueShutdown();
-#ifndef QT_GUI
+ StartShutdown();
-#endif
return;
}
{
ThreadSafeMessageBox(strprintf(_("An error occured while setting up the RPC port %i for listening: %s"), endpoint.port(), e.what()),
_("Error"), wxOK | wxMODAL);
- QueueShutdown();
+ StartShutdown();
return;
}
-#endif
-#ifdef USE_SSL
ssl::context context(io_service, ssl::context::sslv23);
if (fUseSSL)
{
#ifndef BITCOIN_INIT_H
#define BITCOIN_INIT_H
+#include "wallet.h"
+
extern CWallet* pwalletMain;
+ void StartShutdown();
void Shutdown(void* parg);
bool AppInit(int argc, char* argv[]);
bool AppInit2(int argc, char* argv[]);
string strMessage = _("Warning: Disk space is low");
strMiscWarning = strMessage;
printf("*** %s\n", strMessage.c_str());
- ThreadSafeMessageBox(strMessage, "Bitcoin", wxOK | wxICON_EXCLAMATION);
+ ThreadSafeMessageBox(strMessage, "Bitcoin", wxOK | wxICON_EXCLAMATION | wxMODAL);
- QueueShutdown();
+ StartShutdown();
return false;
}
return true;
app.exec();
window.hide();
+ window.setClientModel(0);
+ window.setWalletModel(0);
guiref = 0;
+ clientmodel = 0;
+ walletmodel = 0;
}
+ // Shutdown the core and it's threads, but don't exit Bitcoin-Qt here
Shutdown(NULL);
}
else
#include <boost/interprocess/sync/interprocess_mutex.hpp>
#include <boost/interprocess/sync/interprocess_recursive_mutex.hpp>
#include <boost/foreach.hpp>
+ #include <boost/thread.hpp>
+#include <openssl/crypto.h>
+#include <openssl/rand.h>
+
+#ifdef WIN32
+#ifdef _MSC_VER
+#pragma warning(disable:4786)
+#pragma warning(disable:4804)
+#pragma warning(disable:4805)
+#pragma warning(disable:4717)
+#endif
+#ifdef _WIN32_WINNT
+#undef _WIN32_WINNT
+#endif
+#define _WIN32_WINNT 0x0501
+#ifdef _WIN32_IE
+#undef _WIN32_IE
+#endif
+#define _WIN32_IE 0x0400
+#define WIN32_LEAN_AND_MEAN 1
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif
+#include "shlobj.h"
+#include "shlwapi.h"
+#endif
using namespace std;
using namespace boost;