mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
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
This commit is contained in:
12
util.cpp
12
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()
|
||||
|
||||
Reference in New Issue
Block a user