From 300d4608f2504e3e4a02a13b6c6000b52c436975 Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Fri, 6 Nov 2009 05:50:05 +0000 Subject: got rid of CheckForShutdown, replaced some thread-unsafe wxWidgets calls, Linux fixes, socket send MSG_NOSIGNAL, bind INADDR_ANY, works reliably on Linux now except if wxMessageBox is used in a thread other than the GUI thread git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@33 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- util.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'util.cpp') diff --git a/util.cpp b/util.cpp index d2e624d67..5efb579bf 100644 --- a/util.cpp +++ b/util.cpp @@ -96,12 +96,7 @@ void RandAddSeedPerfmon() hash = 0; memset(pdata, 0, nSize); - time_t nTime; - time(&nTime); - struct tm* ptmTime = gmtime(&nTime); - char pszTime[200]; - strftime(pszTime, sizeof(pszTime), "%x %H:%M:%S", ptmTime); - printf("%s RandAddSeed() %d bytes\n", pszTime, nSize); + printf("%s RandAddSeed() %d bytes\n", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str(), nSize); } #endif } @@ -350,7 +345,9 @@ void FormatException(char* pszMessage, std::exception* pex, const char* pszThrea pszModule[0] = '\0'; GetModuleFileName(NULL, pszModule, sizeof(pszModule)); #else - const char* pszModule = wxStandardPaths::Get().GetExecutablePath().mb_str(); + // might not be thread safe, uses wxString + //const char* pszModule = wxStandardPaths::Get().GetExecutablePath().mb_str(); + const char* pszModule = "bitcoin"; #endif if (pex) snprintf(pszMessage, 1000, @@ -425,7 +422,6 @@ void GetDataDir(char* pszDir) } strlcpy(pszDir, pszCachedDir, MAX_PATH); } - } string GetDataDir() -- cgit v1.2.3