Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Incorrect/duplicated test in CrossConnectionTest.cpp #8

Open
Echelon9 opened this issue Jul 9, 2014 · 0 comments
Open

Incorrect/duplicated test in CrossConnectionTest.cpp #8

Echelon9 opened this issue Jul 9, 2014 · 0 comments

Comments

@Echelon9
Copy link
Contributor

Echelon9 commented Jul 9, 2014

CrossConnectionTest.cpp tests connecting two peers at the same time with the internet simulator running.

One of the test conditionals is a duplicate, whilst the accompanying text output indicates the intention was to test something different ("ID_NEW_INCOMING_CONNECTION is false for both instances")

This may have been caused by an errant copy-paste.

int main()
{
    printf("An internal test to test two peers connecting to each other\n");
    printf("at the same time.  This causes bugs so I fix them here\n");
...
else if (gotConnectionRequestAccepted[0]==0 && gotConnectionRequestAccepted[1]==0)
{
    printf("Test failed, ID_CONNECTION_REQUEST_ACCEPTED is false for both instances\n");
}
else if (gotNewIncomingConnection[0]==1 && gotNewIncomingConnection[1]==1)
{
    printf("Test failed, ID_NEW_INCOMING_CONNECTION is true for both instances\n");
}
else if (gotConnectionRequestAccepted[0]==0 && gotConnectionRequestAccepted[1]==0)
{
    // ** ISSUE HERE, DUPLICATES ABOVE CONDITIONAL **
    printf("Test failed, ID_NEW_INCOMING_CONNECTION is false for both instances\n");
}
...
Luke1410 referenced this issue in SLikeSoft/SLikeNet Jul 31, 2017
Resolve Issue #8 - Incorrect/duplicated test conditional
rhard pushed a commit to rhard/RakNet that referenced this issue Oct 26, 2017
…bugInterface

Fix for NatPunchthroughDebugInterface on non-Windows platforms
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant