mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-17 19:59:57 +00:00
don't return default destination if port is specified explicitly
This commit is contained in:
parent
b8d21a1282
commit
132557f941
@ -1083,6 +1083,7 @@ namespace client
|
|||||||
{
|
{
|
||||||
// streaming protocol
|
// streaming protocol
|
||||||
auto dest = GetStreamingDestination (toPort);
|
auto dest = GetStreamingDestination (toPort);
|
||||||
|
if (!dest) dest = m_StreamingDestination; // if no destination on port use default
|
||||||
if (dest)
|
if (dest)
|
||||||
dest->HandleDataMessagePayload (buf, length);
|
dest->HandleDataMessagePayload (buf, length);
|
||||||
else
|
else
|
||||||
@ -1236,8 +1237,9 @@ namespace client
|
|||||||
if (it != m_StreamingDestinationsByPorts.end ())
|
if (it != m_StreamingDestinationsByPorts.end ())
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
// if port is zero or not found, use default destination
|
else // if port is zero, use default destination
|
||||||
return m_StreamingDestination;
|
return m_StreamingDestination;
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientDestination::AcceptStreams (const i2p::stream::StreamingDestination::Acceptor& acceptor)
|
void ClientDestination::AcceptStreams (const i2p::stream::StreamingDestination::Acceptor& acceptor)
|
||||||
|
@ -693,7 +693,7 @@ namespace client
|
|||||||
{
|
{
|
||||||
if (!inport) inport = port;
|
if (!inport) inport = port;
|
||||||
m_PortDestination = localDestination->GetStreamingDestination (inport);
|
m_PortDestination = localDestination->GetStreamingDestination (inport);
|
||||||
if (!m_PortDestination || (inport && (m_PortDestination == localDestination->GetStreamingDestination ()))) // default destination
|
if (!m_PortDestination) // default destination
|
||||||
m_PortDestination = localDestination->CreateStreamingDestination (inport, gzip);
|
m_PortDestination = localDestination->CreateStreamingDestination (inport, gzip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user