mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 12:24:19 +00:00
more precise peer test
This commit is contained in:
parent
70fcd93ca7
commit
9208da8a50
@ -944,7 +944,7 @@ namespace transport
|
|||||||
// existing test
|
// existing test
|
||||||
case ePeerTestParticipantAlice1:
|
case ePeerTestParticipantAlice1:
|
||||||
{
|
{
|
||||||
if (m_State == eSessionStateEstablished)
|
if (m_Server.GetPeerTestSession (nonce) == shared_from_this ()) // Alice-Bob
|
||||||
{
|
{
|
||||||
LogPrint (eLogDebug, "SSU: peer test from Bob. We are Alice");
|
LogPrint (eLogDebug, "SSU: peer test from Bob. We are Alice");
|
||||||
if (i2p::context.GetStatus () == eRouterStatusTesting) // still not OK
|
if (i2p::context.GetStatus () == eRouterStatusTesting) // still not OK
|
||||||
@ -953,6 +953,8 @@ namespace transport
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogPrint (eLogDebug, "SSU: first peer test from Charlie. We are Alice");
|
LogPrint (eLogDebug, "SSU: first peer test from Charlie. We are Alice");
|
||||||
|
if (m_State == eSessionStateEstablished)
|
||||||
|
LogPrint (eLogWarning, "SSU: first peer test from Charlie through established session. We are Alice");
|
||||||
i2p::context.SetStatus (eRouterStatusOK);
|
i2p::context.SetStatus (eRouterStatusOK);
|
||||||
m_Server.UpdatePeerTest (nonce, ePeerTestParticipantAlice2);
|
m_Server.UpdatePeerTest (nonce, ePeerTestParticipantAlice2);
|
||||||
SendPeerTest (nonce, senderEndpoint.address (), senderEndpoint.port (), introKey, true, false); // to Charlie
|
SendPeerTest (nonce, senderEndpoint.address (), senderEndpoint.port (), introKey, true, false); // to Charlie
|
||||||
@ -961,7 +963,7 @@ namespace transport
|
|||||||
}
|
}
|
||||||
case ePeerTestParticipantAlice2:
|
case ePeerTestParticipantAlice2:
|
||||||
{
|
{
|
||||||
if (m_State == eSessionStateEstablished)
|
if (m_Server.GetPeerTestSession (nonce) == shared_from_this ()) // Alice-Bob
|
||||||
LogPrint (eLogDebug, "SSU: peer test from Bob. We are Alice");
|
LogPrint (eLogDebug, "SSU: peer test from Bob. We are Alice");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user