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:
s_nakamoto
2009-11-06 05:50:05 +00:00
parent e4c05d3177
commit 300d4608f2
12 changed files with 259 additions and 234 deletions

View File

@@ -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()