From 6606a777192a3a2095fe51ad868c85c5ec774f4c Mon Sep 17 00:00:00 2001 From: yellows8 Date: Wed, 13 Apr 2016 00:36:47 -0400 Subject: [PATCH] Updated udsConnectNetwork() to handle failure from the network-connection command properly, and removed the commented prints. --- libctru/source/services/uds.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libctru/source/services/uds.c b/libctru/source/services/uds.c index d1459aa..8d074dd 100644 --- a/libctru/source/services/uds.c +++ b/libctru/source/services/uds.c @@ -267,11 +267,9 @@ Result udsConnectNetwork(const udsNetworkStruct *network, const void *passphrase 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); - if(R_FAILED(ret))return ret; - //printf("bind...\n"); - if(context)ret = udsBind(context, recv_NetworkNodeID, spectator, data_channel); + + if(R_SUCCEEDED(ret) && context)ret = udsBind(context, recv_NetworkNodeID, spectator, data_channel); if(R_FAILED(ret))udsDisconnectNetwork();