From: Luke Dashjr Date: Thu, 14 Jun 2012 18:13:46 +0000 (+0000) Subject: Merge branch '0.5.x' into 0.6.0.x X-Git-Tag: v0.4.0-unstable~129^2~1^2^2 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=6ec9d30905e8df77e60d0195074920271abb977a Merge branch '0.5.x' into 0.6.0.x Conflicts: src/main.h src/net.cpp src/serialize.h --- 6ec9d30905e8df77e60d0195074920271abb977a diff --cc src/bitcoinrpc.cpp index 71725ac,38f102e..78812ba --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@@ -223,7 -165,8 +223,8 @@@ Value stop(const Array& params, bool fH "Stop bitcoin server."); #ifndef QT_GUI // Shutdown will take long enough that the response should get back - CreateThread(Shutdown, NULL); - // NOTE: This should actually work with Bitcoin-Qt too now, but 0.5.0 didn't allow it ++ // 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"); diff --cc src/net.cpp index 6707d79,8384251..d927c50 --- a/src/net.cpp +++ b/src/net.cpp @@@ -1532,11 -1702,11 +1532,11 @@@ void ThreadMessageHandler2(void* parg // Wait and allow messages to bunch up. // Reduce vnThreadsRunning so StopNode has permission to exit while // we're sleeping, but we must always check fShutdown after doing this. - vnThreadsRunning[2]--; + vnThreadsRunning[THREAD_MESSAGEHANDLER]--; Sleep(100); if (fRequestShutdown) - Shutdown(NULL); + StartShutdown(); - vnThreadsRunning[2]++; + vnThreadsRunning[THREAD_MESSAGEHANDLER]++; if (fShutdown) return; }