mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-23 18:45:36 +00:00
more draft on GetStatusCode
This commit is contained in:
parent
c0b23eace9
commit
48b1c8febe
@ -278,7 +278,9 @@ int PS4_SYSV_ABI sceHttpGetStatusCode(int reqId, int* statusCode) {
|
|||||||
LOG_ERROR(Lib_Http, "(STUBBED) called");
|
LOG_ERROR(Lib_Http, "(STUBBED) called");
|
||||||
#if 0
|
#if 0
|
||||||
uint uVar1;
|
uint uVar1;
|
||||||
int iVar2;
|
#endif
|
||||||
|
int returnCode;
|
||||||
|
#if 0
|
||||||
undefined8 uVar3;
|
undefined8 uVar3;
|
||||||
long local_60;
|
long local_60;
|
||||||
undefined1 local_58 [8];
|
undefined1 local_58 [8];
|
||||||
@ -291,35 +293,38 @@ int PS4_SYSV_ABI sceHttpGetStatusCode(int reqId, int* statusCode) {
|
|||||||
local_40 = 0;
|
local_40 = 0;
|
||||||
local_48 = 0;
|
local_48 = 0;
|
||||||
if (g_isHttpInitialized == 0) {
|
if (g_isHttpInitialized == 0) {
|
||||||
iVar2 = -0x7fbcefff;
|
returnCode = -0x7fbcefff;
|
||||||
}
|
|
||||||
else if (statusCode == (int *)0x0) {
|
|
||||||
iVar2 = -0x7fbcee02;
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
if (statusCode == nullptr) {
|
||||||
|
// returnCode = ORBIS_HTTP_ERROR_INVALID_VALUE; //TODO
|
||||||
|
return ORBIS_HTTP_ERROR_INVALID_VALUE;
|
||||||
|
}
|
||||||
|
#if 0
|
||||||
else {
|
else {
|
||||||
uVar1 = getSdkVersion();
|
uVar1 = getSdkVersion();
|
||||||
iVar2 = scePthreadAttrInit(local_50);
|
returnCode = scePthreadAttrInit(local_50);
|
||||||
if ((-1 < iVar2) || (uVar1 < 0x3000000)) {
|
if ((-1 < returnCode) || (uVar1 < 0x3000000)) {
|
||||||
uVar3 = scePthreadSelf();
|
uVar3 = scePthreadSelf();
|
||||||
iVar2 = scePthreadAttrGet(uVar3,local_50);
|
returnCode = scePthreadAttrGet(uVar3,local_50);
|
||||||
if ((iVar2 < 0) && (0x2ffffff < uVar1)) {
|
if ((returnCode < 0) && (0x2ffffff < uVar1)) {
|
||||||
scePthreadAttrDestroy(local_50);
|
scePthreadAttrDestroy(local_50);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
iVar2 = scePthreadAttrGetstack(local_50,&local_60,local_58);
|
returnCode = scePthreadAttrGetstack(local_50,&local_60,local_58);
|
||||||
scePthreadAttrDestroy(local_50);
|
scePthreadAttrDestroy(local_50);
|
||||||
if (((-1 < iVar2) || (uVar1 < 0x3000000)) &&
|
if (((-1 < returnCode) || (uVar1 < 0x3000000)) &&
|
||||||
((uVar1 < 0x1000000 ||
|
((uVar1 < 0x1000000 ||
|
||||||
(iVar2 = -0x7fbcef8a, 0x3fcf < (ulong)((long)&local_40 - local_60))))) {
|
(returnCode = -0x7fbcef8a, 0x3fcf < (ulong)((long)&local_40 - local_60))))) {
|
||||||
iVar2 = FUN_01018c20(&local_48,reqId);
|
returnCode = FUN_01018c20(&local_48,reqId);
|
||||||
if ((-1 < iVar2) && (iVar2 = scePthreadMutexLock(local_48 + 0x530), -1 < iVar2)) {
|
if ((-1 < returnCode) && (returnCode = scePthreadMutexLock(local_48 + 0x530), -1 < returnCode)) {
|
||||||
iVar2 = -0x7fbcef9b;
|
returnCode = -0x7fbcef9b;
|
||||||
if (0x11 < *(int *)(local_48 + 0x20)) {
|
if (0x11 < *(int *)(local_48 + 0x20)) {
|
||||||
if (*(int *)(local_48 + 0x20) == 0x16) {
|
if (*(int *)(local_48 + 0x20) == 0x16) {
|
||||||
iVar2 = *(int *)(local_48 + 0x28);
|
returnCode = *(int *)(local_48 + 0x28);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
iVar2 = 0;
|
returnCode = 0;
|
||||||
*statusCode = *(int *)(local_48 + 0x20c);
|
*statusCode = *(int *)(local_48 + 0x20c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -336,7 +341,7 @@ int PS4_SYSV_ABI sceHttpGetStatusCode(int reqId, int* statusCode) {
|
|||||||
/* WARNING: Subroutine does not return */
|
/* WARNING: Subroutine does not return */
|
||||||
__stack_chk_fail();
|
__stack_chk_fail();
|
||||||
}
|
}
|
||||||
return iVar2;
|
return returnCode;
|
||||||
#endif
|
#endif
|
||||||
*statusCode = 404; // not found
|
*statusCode = 404; // not found
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user