Stability fixes for network recv and ssl_read functions. Sometimes dolphin is just too fast!
This commit is contained in:
parent
bd27982901
commit
43ba6ce6e5
|
@ -471,18 +471,20 @@ static int getNetErrorCode(int ret, std::string caller, bool isRW)
|
||||||
if (ret>= 0)
|
if (ret>= 0)
|
||||||
return ret;
|
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);
|
caller.c_str(), errorCode, DecodeError(errorCode), ret);
|
||||||
|
|
||||||
switch (errorCode)
|
switch (errorCode)
|
||||||
{
|
{
|
||||||
case 10040:
|
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;
|
return -1;
|
||||||
case 10054:
|
case 10054:
|
||||||
return -15;
|
return -15;
|
||||||
case 10056:
|
case 10056:
|
||||||
return -30;
|
return -30;
|
||||||
|
case 10057:
|
||||||
|
return -6;
|
||||||
case 10035:
|
case 10035:
|
||||||
if(isRW){
|
if(isRW){
|
||||||
return -6;
|
return -6;
|
||||||
|
|
|
@ -468,7 +468,7 @@ u32 CWII_IPC_HLE_Device_net_ssl::ExecuteCommandV(u32 _Parameter, SIOCtlVBuffer C
|
||||||
if (returnValue == -1)
|
if (returnValue == -1)
|
||||||
returnValue = -SSL_get_error(ssl, returnValue);
|
returnValue = -SSL_get_error(ssl, returnValue);
|
||||||
Memory::Write_U32(returnValue, _BufferIn);
|
Memory::Write_U32(returnValue, _BufferIn);
|
||||||
returnValue = 0;
|
//returnValue = 0;
|
||||||
}
|
}
|
||||||
INFO_LOG(WII_IPC_NET, "/dev/net/ssl::IOCtlV request IOCTLV_NET_SSL_WRITE "
|
INFO_LOG(WII_IPC_NET, "/dev/net/ssl::IOCtlV request IOCTLV_NET_SSL_WRITE "
|
||||||
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
|
"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];
|
SSL* ssl = sslfds[sslID];
|
||||||
returnValue = SSL_read(ssl, Memory::GetPointer(_BufferIn2), BufferInSize2);
|
returnValue = SSL_read(ssl, Memory::GetPointer(_BufferIn2), BufferInSize2);
|
||||||
if (returnValue == -1)
|
if (returnValue == -1){
|
||||||
returnValue = -SSL_get_error(ssl, returnValue);
|
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();
|
SSL_load_error_strings();
|
||||||
FILE *quickDump = fopen("quickdump.txt", "ab");
|
FILE *quickDump = fopen("quickdump.txt", "ab");
|
||||||
ERR_print_errors_fp(quickDump);
|
ERR_print_errors_fp(quickDump);
|
||||||
|
|
Loading…
Reference in New Issue