mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	fixed crash
This commit is contained in:
		
							parent
							
								
									1303dd478c
								
							
						
					
					
						commit
						5a2b795440
					
				
					 2 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -672,7 +672,7 @@ namespace tunnel
 | 
				
			||||||
						{
 | 
											{
 | 
				
			||||||
							auto pool = tunnel->GetTunnelPool ();
 | 
												auto pool = tunnel->GetTunnelPool ();
 | 
				
			||||||
							// let it die if the tunnel pool has been reconfigured and this is old
 | 
												// let it die if the tunnel pool has been reconfigured and this is old
 | 
				
			||||||
							if (pool && tunnel->GetTunnelConfig()->GetNumHops() == pool->GetNumOutboundHops())
 | 
												if (pool && tunnel->GetNumHops() == pool->GetNumOutboundHops())
 | 
				
			||||||
							{
 | 
												{
 | 
				
			||||||
								tunnel->SetIsRecreated ();
 | 
													tunnel->SetIsRecreated ();
 | 
				
			||||||
								pool->RecreateOutboundTunnel (tunnel);
 | 
													pool->RecreateOutboundTunnel (tunnel);
 | 
				
			||||||
| 
						 | 
					@ -726,7 +726,7 @@ namespace tunnel
 | 
				
			||||||
						{
 | 
											{
 | 
				
			||||||
							auto pool = tunnel->GetTunnelPool ();
 | 
												auto pool = tunnel->GetTunnelPool ();
 | 
				
			||||||
							// let it die if the tunnel pool was reconfigured and has different number of hops
 | 
												// let it die if the tunnel pool was reconfigured and has different number of hops
 | 
				
			||||||
							if (pool && tunnel->GetTunnelConfig()->GetNumHops() == pool->GetNumInboundHops())
 | 
												if (pool && tunnel->GetNumHops() == pool->GetNumInboundHops())
 | 
				
			||||||
							{
 | 
												{
 | 
				
			||||||
								tunnel->SetIsRecreated ();
 | 
													tunnel->SetIsRecreated ();
 | 
				
			||||||
								pool->RecreateInboundTunnel (tunnel);
 | 
													pool->RecreateInboundTunnel (tunnel);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -105,6 +105,7 @@ namespace tunnel
 | 
				
			||||||
			bool IsFailed () const { return m_State == eTunnelStateFailed; };
 | 
								bool IsFailed () const { return m_State == eTunnelStateFailed; };
 | 
				
			||||||
			bool IsRecreated () const { return m_IsRecreated; };
 | 
								bool IsRecreated () const { return m_IsRecreated; };
 | 
				
			||||||
			void SetIsRecreated () { m_IsRecreated = true; };
 | 
								void SetIsRecreated () { m_IsRecreated = true; };
 | 
				
			||||||
 | 
								int GetNumHops () const { return m_Hops.size (); };
 | 
				
			||||||
			virtual bool IsInbound() const = 0;
 | 
								virtual bool IsInbound() const = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			std::shared_ptr<TunnelPool> GetTunnelPool () const { return m_Pool; };
 | 
								std::shared_ptr<TunnelPool> GetTunnelPool () const { return m_Pool; };
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue