]> Chaos Git - corbenik/ctrulib.git/commitdiff
Updated udsConnectNetwork() to handle failure from the network-connection command...
authoryellows8 <yellows8@users.noreply.github.com>
Wed, 13 Apr 2016 04:36:47 +0000 (00:36 -0400)
committeryellows8 <yellows8@users.noreply.github.com>
Wed, 13 Apr 2016 04:36:47 +0000 (00:36 -0400)
libctru/source/services/uds.c

index d1459aa377b035089c6892db5ac0d3a75eaa0fa8..8d074dd287a63b66af21d8565a7e52614595d096 100644 (file)
@@ -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();