mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-10 21:55:11 +01:00
Move up ConnectToPeer
This commit is contained in:
parent
78c7473510
commit
d554070fc3
@ -1217,6 +1217,7 @@ network_connection_error_t Network::ConnectFSM()
|
|||||||
* 5. Until connected:
|
* 5. Until connected:
|
||||||
* 5.1 Send connection message to peer
|
* 5.1 Send connection message to peer
|
||||||
* 5.2 Wait for reply from peer
|
* 5.2 Wait for reply from peer
|
||||||
|
* 6. Test bandwidth
|
||||||
*/
|
*/
|
||||||
switch(this->network_connection_state)
|
switch(this->network_connection_state)
|
||||||
{
|
{
|
||||||
@ -1252,14 +1253,14 @@ network_connection_error_t Network::ConnectFSM()
|
|||||||
return AGAIN_ERROR;
|
return AGAIN_ERROR;
|
||||||
/* Allow some transit time */
|
/* Allow some transit time */
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
if (this->ConnectToPeer() == false)
|
||||||
|
return AGAIN_ERROR;
|
||||||
this->network_connection_state = CONN_WAIT_FOR_PEER_REPLY;
|
this->network_connection_state = CONN_WAIT_FOR_PEER_REPLY;
|
||||||
break;
|
break;
|
||||||
case CONN_WAIT_FOR_PEER_REPLY:
|
case CONN_WAIT_FOR_PEER_REPLY:
|
||||||
/* Connect again in case the first sent was dropped on
|
/* Connect again in case the first sent was dropped on
|
||||||
* its way to the peer */
|
* its way to the peer */
|
||||||
TheC64->TheDisplay->display_status_string((char*)"CONNECTING TO PEER", 1);
|
TheC64->TheDisplay->display_status_string((char*)"CONNECTING TO PEER", 1);
|
||||||
if (this->ConnectToPeer() == false)
|
|
||||||
return AGAIN_ERROR;
|
|
||||||
if (this->WaitForPeerReply() == true)
|
if (this->WaitForPeerReply() == true)
|
||||||
this->network_connection_state = CONN_BANDWIDTH_PING;
|
this->network_connection_state = CONN_BANDWIDTH_PING;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user