diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp index aad1b4489b..8aeefb0c3e 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp @@ -471,18 +471,20 @@ static int getNetErrorCode(int ret, std::string caller, bool isRW) if (ret>= 0) return ret; - INFO_LOG(WII_IPC_NET, "%s failed with error %d: %s, ret= %d\n", + WARN_LOG(WII_IPC_NET, "%s failed with error %d: %s, ret= %d\n", caller.c_str(), errorCode, DecodeError(errorCode), ret); switch (errorCode) { case 10040: - INFO_LOG(WII_IPC_NET, "Find out why this happened, looks like PEEK failure?\n"); + WARN_LOG(WII_IPC_NET, "Find out why this happened, looks like PEEK failure?\n"); return -1; case 10054: return -15; case 10056: return -30; + case 10057: + return -6; case 10035: if(isRW){ return -6; diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net_ssl.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net_ssl.cpp index f07f372dc1..4b82ef9142 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net_ssl.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net_ssl.cpp @@ -468,7 +468,7 @@ u32 CWII_IPC_HLE_Device_net_ssl::ExecuteCommandV(u32 _Parameter, SIOCtlVBuffer C if (returnValue == -1) returnValue = -SSL_get_error(ssl, returnValue); Memory::Write_U32(returnValue, _BufferIn); - returnValue = 0; + //returnValue = 0; } INFO_LOG(WII_IPC_NET, "/dev/net/ssl::IOCtlV request IOCTLV_NET_SSL_WRITE " "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " @@ -504,9 +504,20 @@ u32 CWII_IPC_HLE_Device_net_ssl::ExecuteCommandV(u32 _Parameter, SIOCtlVBuffer C { SSL* ssl = sslfds[sslID]; returnValue = SSL_read(ssl, Memory::GetPointer(_BufferIn2), BufferInSize2); - if (returnValue == -1) + if (returnValue == -1){ returnValue = -SSL_get_error(ssl, returnValue); - + WARN_LOG(WII_IPC_NET, "/dev/net/ssl::IOCtlV request IOCTLV_NET_SSL_READ errorVal= %d", returnValue); + } + if (returnValue == -1) + returnValue = -SSL_ERROR_WANT_READ; + if (returnValue == -5){ + int errorCode = WSAGetLastError(); + if (errorCode == 10057){ + returnValue = -SSL_ERROR_WANT_READ; + }else{ + WARN_LOG(WII_IPC_NET, "/dev/net/ssl::IOCtlV request IOCTLV_NET_SSL_READ ERRORCODE= %d", WSAGetLastError()); + } + } SSL_load_error_strings(); FILE *quickDump = fopen("quickdump.txt", "ab"); ERR_print_errors_fp(quickDump);