mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-16 20:31:47 +02:00
Make tunnels.cfg configurable
This commit is contained in:
parent
14c5753261
commit
3d489a2996
5 changed files with 18 additions and 4 deletions
|
@ -280,13 +280,14 @@ namespace client
|
|||
void ClientContext::ReadTunnels ()
|
||||
{
|
||||
boost::property_tree::ptree pt;
|
||||
std::string pathTunnelsConfigFile = i2p::util::filesystem::GetTunnelsConfigFile().string();
|
||||
try {
|
||||
boost::property_tree::read_ini(
|
||||
i2p::util::filesystem::GetFullPath(TUNNELS_CONFIG_FILENAME),
|
||||
pathTunnelsConfigFile,
|
||||
pt
|
||||
);
|
||||
} catch(const std::exception& ex) {
|
||||
LogPrint(eLogWarning, "Can't read ", TUNNELS_CONFIG_FILENAME, ": ", ex.what ());
|
||||
LogPrint(eLogWarning, "Can't read ", pathTunnelsConfigFile, ": ", ex.what ());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -349,7 +350,7 @@ namespace client
|
|||
LogPrint (eLogError, "I2P server tunnel for destination ", m_AddressBook.ToAddress(localDestination->GetIdentHash ()), " already exists");
|
||||
numServerTunnels++;
|
||||
} else
|
||||
LogPrint (eLogWarning, "Unknown section type=", type, " of ", name, " in ", TUNNELS_CONFIG_FILENAME);
|
||||
LogPrint (eLogWarning, "Unknown section type=", type, " of ", name, " in ", pathTunnelsConfigFile);
|
||||
|
||||
} catch (const std::exception& ex) {
|
||||
LogPrint (eLogError, "Can't read tunnel ", name, " params: ", ex.what ());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue