Mercurial > hg > bitcoin
changeset 2740:35fda64364cc draft
Merge pull request #1421 from Diapolo/netbase_fix_sign_warnings
fix two signed/unsigned comparison warnings in netbase.cpp
author | Pieter Wuille <pieter.wuille@gmail.com> |
---|---|
date | Fri, 08 Jun 2012 07:29:34 -0700 |
parents | d52f6bf2c726 (diff) 27ea591bcb34 (current diff) |
children | 896b2ad54e66 5841beafdefd |
files | |
diffstat | 5 files changed, 15 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/allocators.h +++ b/src/allocators.h @@ -117,7 +117,6 @@ }; // This is exactly like std::string, but with a custom allocator. -// (secure_allocator<> is defined in serialize.h) typedef std::basic_string<char, std::char_traits<char>, secure_allocator<char> > SecureString; #endif
--- a/src/init.cpp +++ b/src/init.cpp @@ -425,6 +425,7 @@ printf("Bitcoin version %s (%s)\n", FormatFullVersion().c_str(), CLIENT_DATE.c_str()); printf("Startup time: %s\n", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str()); printf("Default data directory %s\n", GetDefaultDataDir().string().c_str()); + printf("Used data directory %s\n", GetDataDir().string().c_str()); std::ostringstream strErrors; if (fDaemon)
--- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -148,7 +148,7 @@ if (GetProxy(NET_IPV4, addrProxy)) return QVariant(QString::fromStdString(addrProxy.ToStringIP())); else - return QVariant(QString::fromStdString("localhost")); + return QVariant(QString::fromStdString("127.0.0.1")); } case ProxyPort: { CService addrProxy;
--- a/src/sync.cpp +++ b/src/sync.cpp @@ -7,6 +7,14 @@ #include <boost/foreach.hpp> +#ifdef DEBUG_LOCKCONTENTION +void PrintLockContention(const char* pszName, const char* pszFile, int nLine) +{ + printf("LOCKCONTENTION: %s\n", pszName); + printf("Locker: %s:%d\n", pszFile, nLine); +} +#endif /* DEBUG_LOCKCONTENTION */ + #ifdef DEBUG_LOCKORDER // // Early deadlock detection.
--- a/src/sync.h +++ b/src/sync.h @@ -27,6 +27,10 @@ void static inline LeaveCritical() {} #endif +#ifdef DEBUG_LOCKCONTENTION +void PrintLockContention(const char* pszName, const char* pszFile, int nLine); +#endif + /** Wrapper around boost::interprocess::scoped_lock */ template<typename Mutex> class CMutexLock @@ -43,8 +47,7 @@ #ifdef DEBUG_LOCKCONTENTION if (!lock.try_lock()) { - printf("LOCKCONTENTION: %s\n", pszName); - printf("Locker: %s:%d\n", pszFile, nLine); + PrintLockContention(pszName, pszFile, nLine); #endif lock.lock(); #ifdef DEBUG_LOCKCONTENTION