diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2016-02-03 05:41:13 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2016-02-03 05:41:13 +0000 |
commit | a68bb9f5e7ef1da5c044907dc3a1d3d4a4dbc2cc (patch) | |
tree | 7e3932c75353499d6659b4f5a94b40e07e64c364 /src/util.cpp | |
parent | 027fdb83b41ae9e9125cf61f6460c03ab34e5961 (diff) | |
parent | fd13fe7ca01b6104ce591af2b90ee6951ccc5a16 (diff) |
Merge branch 'master' into single_prodname
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/util.cpp b/src/util.cpp index 1f6b84119a..492697e12f 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2009-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -99,6 +99,9 @@ namespace boost { using namespace std; +const char * const BITCOIN_CONF_FILENAME = "bitcoin.conf"; +const char * const BITCOIN_PID_FILENAME = "bitcoind.pid"; + map<string, string> mapArgs; map<string, vector<string> > mapMultiArgs; bool fDebug = false; @@ -107,9 +110,9 @@ bool fPrintToDebugLog = true; bool fDaemon = false; bool fServer = false; string strMiscWarning; -bool fLogTimestamps = false; +bool fLogTimestamps = DEFAULT_LOGTIMESTAMPS; bool fLogTimeMicros = DEFAULT_LOGTIMEMICROS; -bool fLogIPs = false; +bool fLogIPs = DEFAULT_LOGIPS; volatile bool fReopenDebugLog = false; CTranslationInterface translationInterface; @@ -447,7 +450,6 @@ void PrintExceptionContinue(const std::exception* pex, const char* pszThread) std::string message = FormatException(pex, pszThread); LogPrintf("\n\n************************\n%s\n", message); fprintf(stderr, "\n\n************************\n%s\n", message.c_str()); - strMiscWarning = message; } boost::filesystem::path GetDefaultDataDir() @@ -521,7 +523,7 @@ void ClearDatadirCache() boost::filesystem::path GetConfigFile() { - boost::filesystem::path pathConfigFile(GetArg("-conf", "bitcoin.conf")); + boost::filesystem::path pathConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME)); if (!pathConfigFile.is_complete()) pathConfigFile = GetDataDir(false) / pathConfigFile; @@ -555,7 +557,7 @@ void ReadConfigFile(map<string, string>& mapSettingsRet, #ifndef WIN32 boost::filesystem::path GetPidFile() { - boost::filesystem::path pathPidFile(GetArg("-pid", "bitcoind.pid")); + boost::filesystem::path pathPidFile(GetArg("-pid", BITCOIN_PID_FILENAME)); if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile; return pathPidFile; } |