Remove path.make_preferred() calls, and fix compiler error in bitcoinrpc RE: boost::system
This commit is contained in:
parent
37e7e72041
commit
2232717cba
3 changed files with 1 additions and 10 deletions
|
@ -2384,7 +2384,7 @@ void ThreadRPCServer2(void* parg)
|
||||||
acceptor.bind(endpoint);
|
acceptor.bind(endpoint);
|
||||||
acceptor.listen(socket_base::max_connections);
|
acceptor.listen(socket_base::max_connections);
|
||||||
}
|
}
|
||||||
catch(system::system_error &e)
|
catch(boost::system::system_error &e)
|
||||||
{
|
{
|
||||||
ThreadSafeMessageBox(strprintf(_("An error occured while setting up the RPC port %i for listening: %s"), endpoint.port(), e.what()),
|
ThreadSafeMessageBox(strprintf(_("An error occured while setting up the RPC port %i for listening: %s"), endpoint.port(), e.what()),
|
||||||
_("Error"), wxOK | wxMODAL);
|
_("Error"), wxOK | wxMODAL);
|
||||||
|
@ -2399,13 +2399,11 @@ void ThreadRPCServer2(void* parg)
|
||||||
|
|
||||||
filesystem::path pathCertFile(GetArg("-rpcsslcertificatechainfile", "server.cert"));
|
filesystem::path pathCertFile(GetArg("-rpcsslcertificatechainfile", "server.cert"));
|
||||||
if (!pathCertFile.is_complete()) pathCertFile = filesystem::path(GetDataDir()) / pathCertFile;
|
if (!pathCertFile.is_complete()) pathCertFile = filesystem::path(GetDataDir()) / pathCertFile;
|
||||||
pathCertFile.make_preferred();
|
|
||||||
if (filesystem::exists(pathCertFile)) context.use_certificate_chain_file(pathCertFile.string().c_str());
|
if (filesystem::exists(pathCertFile)) context.use_certificate_chain_file(pathCertFile.string().c_str());
|
||||||
else printf("ThreadRPCServer ERROR: missing server certificate file %s\n", pathCertFile.string().c_str());
|
else printf("ThreadRPCServer ERROR: missing server certificate file %s\n", pathCertFile.string().c_str());
|
||||||
|
|
||||||
filesystem::path pathPKFile(GetArg("-rpcsslprivatekeyfile", "server.pem"));
|
filesystem::path pathPKFile(GetArg("-rpcsslprivatekeyfile", "server.pem"));
|
||||||
if (!pathPKFile.is_complete()) pathPKFile = filesystem::path(GetDataDir()) / pathPKFile;
|
if (!pathPKFile.is_complete()) pathPKFile = filesystem::path(GetDataDir()) / pathPKFile;
|
||||||
pathPKFile.make_preferred();
|
|
||||||
if (filesystem::exists(pathPKFile)) context.use_private_key_file(pathPKFile.string().c_str(), ssl::context::pem);
|
if (filesystem::exists(pathPKFile)) context.use_private_key_file(pathPKFile.string().c_str(), ssl::context::pem);
|
||||||
else printf("ThreadRPCServer ERROR: missing server private key file %s\n", pathPKFile.string().c_str());
|
else printf("ThreadRPCServer ERROR: missing server private key file %s\n", pathPKFile.string().c_str());
|
||||||
|
|
||||||
|
|
|
@ -80,10 +80,8 @@ CDB::CDB(const char* pszFile, const char* pszMode) : pdb(NULL)
|
||||||
return;
|
return;
|
||||||
string strDataDir = GetDataDir();
|
string strDataDir = GetDataDir();
|
||||||
filesystem::path pathLogDir(strDataDir + "/database");
|
filesystem::path pathLogDir(strDataDir + "/database");
|
||||||
pathLogDir.make_preferred();
|
|
||||||
filesystem::create_directory(pathLogDir);
|
filesystem::create_directory(pathLogDir);
|
||||||
filesystem::path pathErrorFile(strDataDir + "/db.log");
|
filesystem::path pathErrorFile(strDataDir + "/db.log");
|
||||||
pathErrorFile.make_preferred();
|
|
||||||
printf("dbenv.open LogDir=%s ErrorFile=%s\n", pathLogDir.string().c_str(), pathErrorFile.string().c_str());
|
printf("dbenv.open LogDir=%s ErrorFile=%s\n", pathLogDir.string().c_str(), pathErrorFile.string().c_str());
|
||||||
|
|
||||||
int nDbCache = GetArg("-dbcache", 25);
|
int nDbCache = GetArg("-dbcache", 25);
|
||||||
|
@ -1179,9 +1177,7 @@ bool BackupWallet(const CWallet& wallet, const string& strDest)
|
||||||
|
|
||||||
// Copy wallet.dat
|
// Copy wallet.dat
|
||||||
filesystem::path pathSrc(GetDataDir() + "/" + wallet.strWalletFile);
|
filesystem::path pathSrc(GetDataDir() + "/" + wallet.strWalletFile);
|
||||||
pathSrc.make_preferred();
|
|
||||||
filesystem::path pathDest(strDest);
|
filesystem::path pathDest(strDest);
|
||||||
pathDest.make_preferred();
|
|
||||||
if (filesystem::is_directory(pathDest))
|
if (filesystem::is_directory(pathDest))
|
||||||
pathDest = pathDest / wallet.strWalletFile;
|
pathDest = pathDest / wallet.strWalletFile;
|
||||||
|
|
||||||
|
|
|
@ -862,7 +862,6 @@ string GetConfigFile()
|
||||||
|
|
||||||
fs::path pathConfigFile(GetArg("-conf", "bitcoin.conf"));
|
fs::path pathConfigFile(GetArg("-conf", "bitcoin.conf"));
|
||||||
if (!pathConfigFile.is_complete()) pathConfigFile = fs::path(GetDataDir()) / pathConfigFile;
|
if (!pathConfigFile.is_complete()) pathConfigFile = fs::path(GetDataDir()) / pathConfigFile;
|
||||||
pathConfigFile.make_preferred();
|
|
||||||
return pathConfigFile.string();
|
return pathConfigFile.string();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -877,7 +876,6 @@ bool ReadConfigFile(map<string, string>& mapSettingsRet,
|
||||||
if (fs::is_directory(fs::system_complete(mapSettingsRet["-datadir"])))
|
if (fs::is_directory(fs::system_complete(mapSettingsRet["-datadir"])))
|
||||||
{
|
{
|
||||||
fs::path pathDataDir(fs::system_complete(mapSettingsRet["-datadir"]));
|
fs::path pathDataDir(fs::system_complete(mapSettingsRet["-datadir"]));
|
||||||
pathDataDir.make_preferred();
|
|
||||||
|
|
||||||
strlcpy(pszSetDataDir, pathDataDir.string().c_str(), sizeof(pszSetDataDir));
|
strlcpy(pszSetDataDir, pathDataDir.string().c_str(), sizeof(pszSetDataDir));
|
||||||
}
|
}
|
||||||
|
@ -915,7 +913,6 @@ string GetPidFile()
|
||||||
|
|
||||||
fs::path pathPidFile(GetArg("-pid", "bitcoind.pid"));
|
fs::path pathPidFile(GetArg("-pid", "bitcoind.pid"));
|
||||||
if (!pathPidFile.is_complete()) pathPidFile = fs::path(GetDataDir()) / pathPidFile;
|
if (!pathPidFile.is_complete()) pathPidFile = fs::path(GetDataDir()) / pathPidFile;
|
||||||
pathPidFile.make_preferred();
|
|
||||||
return pathPidFile.string();
|
return pathPidFile.string();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue