mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-18 23:36:39 +01:00
Merge remote-tracking branch 'upstream/openssl' into my_fixes
This commit is contained in:
commit
cea38549da
1 changed files with 13 additions and 16 deletions
|
@ -611,21 +611,18 @@ namespace stream
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!m_CurrentOutboundTunnel) // first message to send
|
if (!m_RoutingSession || !m_RoutingSession->GetOwner ()) // expired and detached
|
||||||
|
m_RoutingSession = m_LocalDestination.GetOwner ()->GetRoutingSession (m_RemoteLeaseSet, true);
|
||||||
|
if (!m_CurrentOutboundTunnel && m_RoutingSession) // first message to send
|
||||||
{
|
{
|
||||||
// try to get shared path first
|
// try to get shared path first
|
||||||
if (!m_RoutingSession)
|
auto routingPath = m_RoutingSession->GetSharedRoutingPath ();
|
||||||
m_RoutingSession = m_LocalDestination.GetOwner ()->GetRoutingSession (m_RemoteLeaseSet, true);
|
if (routingPath)
|
||||||
if (m_RoutingSession)
|
|
||||||
{
|
{
|
||||||
auto routingPath = m_RoutingSession->GetSharedRoutingPath ();
|
m_CurrentOutboundTunnel = routingPath->outboundTunnel;
|
||||||
if (routingPath)
|
m_CurrentRemoteLease = routingPath->remoteLease;
|
||||||
{
|
m_RTT = routingPath->rtt;
|
||||||
m_CurrentOutboundTunnel = routingPath->outboundTunnel;
|
m_RTO = m_RTT*1.5; // TODO: implement it better
|
||||||
m_CurrentRemoteLease = routingPath->remoteLease;
|
|
||||||
m_RTT = routingPath->rtt;
|
|
||||||
m_RTO = m_RTT*1.5; // TODO: implement it better
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!m_CurrentOutboundTunnel || !m_CurrentOutboundTunnel->IsEstablished ())
|
if (!m_CurrentOutboundTunnel || !m_CurrentOutboundTunnel->IsEstablished ())
|
||||||
|
@ -900,13 +897,13 @@ namespace stream
|
||||||
if (packet->IsSYN () && !packet->GetSeqn ()) // new incoming stream
|
if (packet->IsSYN () && !packet->GetSeqn ()) // new incoming stream
|
||||||
{
|
{
|
||||||
uint32_t receiveStreamID = packet->GetReceiveStreamID ();
|
uint32_t receiveStreamID = packet->GetReceiveStreamID ();
|
||||||
/* if (receiveStreamID == m_LastIncomingReceiveStreamID)
|
if (receiveStreamID == m_LastIncomingReceiveStreamID)
|
||||||
{
|
{
|
||||||
// already pending
|
// already pending
|
||||||
LogPrint(eLogWarning, "Streaming: Incoming streaming with rSID=", receiveStreamID, " already exists");
|
LogPrint(eLogWarning, "Streaming: Incoming streaming with rSID=", receiveStreamID, " already exists");
|
||||||
delete packet; // drop it, because previous should be connected
|
delete packet; // drop it, because previous should be connected
|
||||||
return;
|
return;
|
||||||
} */
|
}
|
||||||
auto incomingStream = CreateNewIncomingStream ();
|
auto incomingStream = CreateNewIncomingStream ();
|
||||||
incomingStream->HandleNextPacket (packet); // SYN
|
incomingStream->HandleNextPacket (packet); // SYN
|
||||||
auto ident = incomingStream->GetRemoteIdentity();
|
auto ident = incomingStream->GetRemoteIdentity();
|
||||||
|
|
Loading…
Add table
Reference in a new issue