Merge branch '0.4.x' into 0.5.x

Conflicts:
	src/bitcoinrpc.cpp
	src/init.cpp
This commit is contained in:
Luke Dashjr
2012-10-09 23:16:24 +00:00
3 changed files with 10 additions and 4 deletions
+8 -2
View File
@@ -194,8 +194,14 @@ inline int OutputDebugStringF(const char* pszFormat, ...)
if (fileout)
{
static bool fStartedNewLine = true;
static boost::mutex mutexDebugLog;
boost::mutex::scoped_lock scoped_lock(mutexDebugLog);
// This routine may be called by global destructors during shutdown.
// Since the order of destruction of static/global objects is undefined,
// allocate mutexDebugLog on the heap the first time this routine
// is called to avoid crashes during shutdown.
static boost::mutex* mutexDebugLog = NULL;
if (mutexDebugLog == NULL) mutexDebugLog = new boost::mutex();
boost::mutex::scoped_lock scoped_lock(*mutexDebugLog);
// Debug print useful for profiling
if (fLogTimestamps && fStartedNewLine)