daemon mode feature

This commit is contained in:
fireice-uk
2017-05-26 19:36:38 +01:00
parent 07ea73dbc3
commit 83762e5bed
6 changed files with 21 additions and 6 deletions
+7 -1
View File
@@ -48,7 +48,7 @@ using namespace rapidjson;
enum configEnum { aCpuThreadsConf, sUseSlowMem, bNiceHashMode,
bTlsMode, bTlsSecureAlgo, sTlsFingerprint, sPoolAddr, sWalletAddr, sPoolPwd,
iCallTimeout, iNetRetry, iGiveUpLimit, iVerboseLevel, iAutohashTime,
sOutputFile, iHttpdPort, bPreferIpv4 };
bDaemonMode, sOutputFile, iHttpdPort, bPreferIpv4 };
struct configVal {
configEnum iName;
@@ -73,6 +73,7 @@ configVal oConfigValues[] = {
{ iGiveUpLimit, "giveup_limit", kNumberType },
{ iVerboseLevel, "verbose_level", kNumberType },
{ iAutohashTime, "h_print_time", kNumberType },
{ bDaemonMode, "daemon_mode", kTrueType },
{ sOutputFile, "output_file", kStringType },
{ iHttpdPort, "httpd_port", kNumberType },
{ bPreferIpv4, "prefer_ipv4", kTrueType }
@@ -251,6 +252,11 @@ bool jconf::NiceHashMode()
return prv->configValues[bNiceHashMode]->GetBool();
}
bool jconf::DaemonMode()
{
return prv->configValues[bDaemonMode]->GetBool();
}
const char* jconf::GetOutputFile()
{
return prv->configValues[sOutputFile]->GetString();