mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
pass null tunnel config for zero hops tunnel
This commit is contained in:
parent
6ab7e79987
commit
0493f00a7a
2 changed files with 14 additions and 17 deletions
12
Tunnel.cpp
12
Tunnel.cpp
|
@ -771,18 +771,18 @@ namespace tunnel
|
|||
|
||||
std::shared_ptr<InboundTunnel> Tunnels::CreateInboundTunnel (std::shared_ptr<TunnelConfig> config, std::shared_ptr<OutboundTunnel> outboundTunnel)
|
||||
{
|
||||
if (config->IsEmpty ())
|
||||
return CreateZeroHopsInboundTunnel ();
|
||||
else
|
||||
if (config)
|
||||
return CreateTunnel<InboundTunnel>(config, outboundTunnel);
|
||||
else
|
||||
return CreateZeroHopsInboundTunnel ();
|
||||
}
|
||||
|
||||
std::shared_ptr<OutboundTunnel> Tunnels::CreateOutboundTunnel (std::shared_ptr<TunnelConfig> config)
|
||||
{
|
||||
if (config->IsEmpty ())
|
||||
return CreateZeroHopsOutboundTunnel ();
|
||||
else
|
||||
if (config)
|
||||
return CreateTunnel<OutboundTunnel>(config);
|
||||
else
|
||||
return CreateZeroHopsOutboundTunnel ();
|
||||
}
|
||||
|
||||
void Tunnels::AddPendingTunnel (uint32_t replyMsgID, std::shared_ptr<InboundTunnel> tunnel)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue