Updated udsConnectNetwork() to handle failure from the network-connection command properly, and removed the commented prints.

This commit is contained in:
yellows8 2016-04-13 00:36:47 -04:00
parent a653c49aaa
commit 6606a77719

View File

@ -267,11 +267,9 @@ Result udsConnectNetwork(const udsNetworkStruct *network, const void *passphrase
if(connection_type==UDSCONTYPE_Spectator)spectator=true; if(connection_type==UDSCONTYPE_Spectator)spectator=true;
//printf("connecting...\n");//Removing these prints caused connecting to fail.
ret = udsipc_ConnectToNetwork(network, passphrase, passphrase_size, connection_type); ret = udsipc_ConnectToNetwork(network, passphrase, passphrase_size, connection_type);
if(R_FAILED(ret))return ret;
//printf("bind...\n"); if(R_SUCCEEDED(ret) && context)ret = udsBind(context, recv_NetworkNodeID, spectator, data_channel);
if(context)ret = udsBind(context, recv_NetworkNodeID, spectator, data_channel);
if(R_FAILED(ret))udsDisconnectNetwork(); if(R_FAILED(ret))udsDisconnectNetwork();