aboutsummaryrefslogtreecommitdiff
path: root/ui.cpp
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-08 04:24:52 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-08 04:24:52 +0000
commit956468c29adcbff83ab7c2e52d91f8e87b704853 (patch)
tree05af29c750335841182e060f2332adc384b88810 /ui.cpp
parentb4e235f9f23b492539eeeddbbd1e7a7ef1b6793e (diff)
Get local host IP on Linux, Shutdown() a little cleaner -- linux-0.1.6-test1 waypointv0.1.6test1
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@37 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'ui.cpp')
-rw-r--r--ui.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/ui.cpp b/ui.cpp
index a1873d5c2d..e12970b81b 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -387,17 +387,28 @@ CMainFrame::~CMainFrame()
void Shutdown(void* parg)
{
static CCriticalSection cs_Shutdown;
+ static bool fTaken;
+ bool fFirstThread;
CRITICAL_BLOCK(cs_Shutdown)
{
+ fFirstThread = !fTaken;
+ fTaken = true;
+ }
+ if (fFirstThread)
+ {
fShutdown = true;
nTransactionsUpdated++;
DBFlush(false);
StopNode();
DBFlush(true);
-
printf("Bitcoin exiting\n\n");
exit(0);
}
+ else
+ {
+ loop
+ Sleep(100000);
+ }
}
void CMainFrame::OnClose(wxCloseEvent& event)