Disabled the debug prints for network-connecting and implemented udsEjectClient().
This commit is contained in:
parent
4393593e48
commit
6570ade097
@ -270,3 +270,9 @@ Result udsDestroyNetwork(void);
|
||||
*/
|
||||
Result udsDisconnectNetwork(void);
|
||||
|
||||
/**
|
||||
* @brief This can be used by the host to force-disconnect client(s).
|
||||
* @param NetworkNodeID Target NetworkNodeID. UDS_BROADCAST_NETWORKNODEID can be used to disconnect all clients.
|
||||
*/
|
||||
Result udsEjectClient(u16 NetworkNodeID);
|
||||
|
||||
|
@ -262,10 +262,10 @@ Result udsCreateNetwork(udsNetworkStruct *network, void* passphrase, size_t pass
|
||||
Result udsConnectNetwork(udsNetworkStruct *network, void* passphrase, size_t passphrase_size, udsBindContext *context, u16 recv_NetworkNodeID, udsConnectionType connection_type)
|
||||
{
|
||||
Result ret=0;
|
||||
printf("connecting...\n");//Removing these prints caused connecting to fail.
|
||||
//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");
|
||||
//printf("bind...\n");
|
||||
ret = udsBind(context, recv_NetworkNodeID);
|
||||
|
||||
if(R_FAILED(ret))udsDisconnectNetwork();
|
||||
@ -308,6 +308,19 @@ static Result udsipc_Shutdown(void)
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
Result udsEjectClient(u16 NetworkNodeID)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0]=IPC_MakeHeader(0x5,1,0); // 0x50040
|
||||
cmdbuf[1]=NetworkNodeID;
|
||||
|
||||
Result ret=0;
|
||||
if(R_FAILED(ret=svcSendSyncRequest(__uds_servhandle)))return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
Result udsDestroyNetwork(void)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
|
Loading…
Reference in New Issue
Block a user