|
|
@ -280,13 +280,14 @@ namespace client |
|
|
|
void ClientContext::ReadTunnels () |
|
|
|
void ClientContext::ReadTunnels () |
|
|
|
{ |
|
|
|
{ |
|
|
|
boost::property_tree::ptree pt; |
|
|
|
boost::property_tree::ptree pt; |
|
|
|
|
|
|
|
std::string pathTunnelsConfigFile = i2p::util::filesystem::GetTunnelsConfigFile().string(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
boost::property_tree::read_ini( |
|
|
|
boost::property_tree::read_ini( |
|
|
|
i2p::util::filesystem::GetFullPath(TUNNELS_CONFIG_FILENAME), |
|
|
|
pathTunnelsConfigFile, |
|
|
|
pt |
|
|
|
pt |
|
|
|
); |
|
|
|
); |
|
|
|
} catch(const std::exception& ex) { |
|
|
|
} catch(const std::exception& ex) { |
|
|
|
LogPrint(eLogWarning, "Can't read ", TUNNELS_CONFIG_FILENAME, ": ", ex.what ()); |
|
|
|
LogPrint(eLogWarning, "Can't read ", pathTunnelsConfigFile, ": ", ex.what ()); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -349,7 +350,7 @@ namespace client |
|
|
|
LogPrint (eLogError, "I2P server tunnel for destination ", m_AddressBook.ToAddress(localDestination->GetIdentHash ()), " already exists"); |
|
|
|
LogPrint (eLogError, "I2P server tunnel for destination ", m_AddressBook.ToAddress(localDestination->GetIdentHash ()), " already exists"); |
|
|
|
numServerTunnels++; |
|
|
|
numServerTunnels++; |
|
|
|
} else |
|
|
|
} 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) { |
|
|
|
} catch (const std::exception& ex) { |
|
|
|
LogPrint (eLogError, "Can't read tunnel ", name, " params: ", ex.what ()); |
|
|
|
LogPrint (eLogError, "Can't read tunnel ", name, " params: ", ex.what ()); |
|
|
|