aboutsummaryrefslogtreecommitdiff
path: root/util.cpp
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-06 05:50:05 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-06 05:50:05 +0000
commit300d4608f2504e3e4a02a13b6c6000b52c436975 (patch)
tree87a748950637c99cca980d634ae499085777e2f0 /util.cpp
parente4c05d31778a85014b2a52e2f20753b38dfbf950 (diff)
downloadbitcoin-300d4608f2504e3e4a02a13b6c6000b52c436975.tar.xz
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
Diffstat (limited to 'util.cpp')
-rw-r--r--util.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/util.cpp b/util.cpp
index d2e624d676..5efb579bf7 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()