From 6db1ced0c083e0c82763be828f74b5c35cff2a98 Mon Sep 17 00:00:00 2001 From: ANR2ME Date: Sun, 24 Jan 2021 18:26:43 +0700 Subject: [PATCH] Fix returned error code on PtpSend and PtpRecv when socket is not connected yet. --- Core/HLE/sceNetAdhoc.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Core/HLE/sceNetAdhoc.cpp b/Core/HLE/sceNetAdhoc.cpp index 7678838bb6d9..4355861d3bdf 100644 --- a/Core/HLE/sceNetAdhoc.cpp +++ b/Core/HLE/sceNetAdhoc.cpp @@ -3880,16 +3880,16 @@ static int sceNetAdhocPtpSend(int id, u32 dataAddr, u32 dataSizeAddr, int timeou // Change Socket State ptpsocket.state = ADHOC_PTP_STATE_CLOSED; - // Disconnected - return hleLogError(SCENET, ERROR_NET_ADHOC_DISCONNECTED, "disconnected"); + // Disconnected or Not connected? + return hleLogError(SCENET, ERROR_NET_ADHOC_DISCONNECTED, "disconnected?"); } // Invalid Arguments return hleLogError(SCENET, ERROR_NET_ADHOC_INVALID_ARG, "invalid arg"); } - // Not connected - return hleLogError(SCENET, ERROR_NET_ADHOC_NOT_CONNECTED, "not connected"); + // Disconnected + return hleLogError(SCENET, ERROR_NET_ADHOC_DISCONNECTED, "disconnected"); } // Invalid Socket @@ -3994,11 +3994,11 @@ static int sceNetAdhocPtpRecv(int id, u32 dataAddr, u32 dataSizeAddr, int timeou // Change Socket State ptpsocket.state = ADHOC_PTP_STATE_CLOSED; - // Disconnected - return hleLogError(SCENET, ERROR_NET_ADHOC_DISCONNECTED, "disconnected"); + // Disconnected or Not connected? + return hleLogError(SCENET, ERROR_NET_ADHOC_DISCONNECTED, "disconnected?"); } - return hleLogError(SCENET, ERROR_NET_ADHOC_NOT_CONNECTED, "not connected"); + return hleLogError(SCENET, ERROR_NET_ADHOC_DISCONNECTED, "disconnected"); } // Invalid Socket