mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	Make tunnels.cfg configurable
This commit is contained in:
		
							parent
							
								
									f6eabd695b
								
							
						
					
					
						commit
						4109ab1590
					
				
					 5 changed files with 14 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -243,13 +243,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), pt);
 | 
			
		||||
			boost::property_tree::read_ini (pathTunnelsConfigFile, pt);
 | 
			
		||||
		}
 | 
			
		||||
		catch (std::exception& ex)
 | 
			
		||||
		{
 | 
			
		||||
			LogPrint (eLogWarning, "Can't read ", TUNNELS_CONFIG_FILENAME, ": ", ex.what ());
 | 
			
		||||
			LogPrint (eLogWarning, "Can't read ", pathTunnelsConfigFile, ": ", ex.what ());
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
			
 | 
			
		||||
| 
						 | 
				
			
			@ -313,7 +314,7 @@ namespace client
 | 
			
		|||
					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 (std::exception& ex)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue