Merge pull request #3869 from gookie-dev/feat/http2-delete-cookie-box
feat(libSceHttp2): implement sceHttp2DeleteCookieBox
This commit is contained in:
commit
052134100e
|
|
@ -356,6 +356,13 @@ int APS5_VABI sceHttp2CreateCookieBox(int lib_http2_ctx_id) {
|
|||
return id;
|
||||
}
|
||||
|
||||
int APS5_VABI sceHttp2DeleteCookieBox(int cookie_box_id) {
|
||||
std::lock_guard lock(g_handlesMutex);
|
||||
if (FindHandle(cookie_box_id, Http2Kind::CookieBox) == nullptr) return ERROR_INVALID_ID;
|
||||
g_handles.erase(cookie_box_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int APS5_VABI sceHttp2SetCookieBox(int id, int cookie_box_id) {
|
||||
(void)id;
|
||||
(void)cookie_box_id;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ int APS5_VABI sceHttp2Init(int, int, std::size_t, int);
|
|||
int APS5_VABI sceHttp2CreateTemplate(int, const char*, int, int);
|
||||
int APS5_VABI sceHttp2CreateRequestWithURL(int, const char*, const char*, std::uint64_t);
|
||||
int APS5_VABI sceHttp2CreateCookieBox(int);
|
||||
int APS5_VABI sceHttp2DeleteCookieBox(int);
|
||||
int APS5_VABI sceHttp2SetCookieBox(int, int);
|
||||
int APS5_VABI sceHttp2CookieFlush(int);
|
||||
int APS5_VABI sceHttp2SetRequestNoContentLength(int);
|
||||
|
|
@ -71,6 +72,11 @@ int main() {
|
|||
const int box = sceHttp2CreateCookieBox(context);
|
||||
const int other = sceHttp2CreateCookieBox(context);
|
||||
Require(box > 0 && other > 0 && box != other && box != context);
|
||||
const int discarded = sceHttp2CreateCookieBox(context);
|
||||
Require(discarded > 0 && discarded != box && discarded != other);
|
||||
Require(sceHttp2DeleteCookieBox(discarded) == 0);
|
||||
Require(sceHttp2DeleteCookieBox(discarded) == InvalidId);
|
||||
Require(sceHttp2DeleteCookieBox(context) == InvalidId);
|
||||
const int tmpl = sceHttp2CreateTemplate(context, "agent", 2, 0);
|
||||
Require(tmpl > 0 && tmpl != box && tmpl != other);
|
||||
Require(sceHttp2SetResolveRetry(tmpl, 3) == 0);
|
||||
|
|
@ -119,6 +125,7 @@ int main() {
|
|||
Require(sceHttp2Term(doomedContext) == 0);
|
||||
RequireSslSetters(doomedContext, InvalidId);
|
||||
RequireSslSetters(doomedContextBox, InvalidId);
|
||||
Require(sceHttp2DeleteCookieBox(doomedContextBox) == InvalidId);
|
||||
RequireSslSetters(doomedContextTemplate, InvalidId);
|
||||
RequireSslSetters(doomedContextRequest, InvalidId);
|
||||
Require(sceHttp2Term(doomedContext) == InvalidId);
|
||||
|
|
@ -153,6 +160,7 @@ int main() {
|
|||
Require(Throws([&] { sceHttp2WaitAsync(request, &result, nullptr, nullptr); }));
|
||||
Require(sceHttp2DeleteRequest(request) == 0);
|
||||
Require(sceKernelDeleteEqueue(eq) == 0);
|
||||
Require(sceHttp2DeleteCookieBox(box) == 0 && sceHttp2DeleteCookieBox(other) == 0);
|
||||
Require(sceHttp2Term(context) == 0);
|
||||
|
||||
KernelEqueue templateEqueue = 0;
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ Throughout the project, every function at every stage either **does exactly what
|
|||
- [Indices far past every vertex fetch](../../core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp) (libSceAgcDriver) - when a draw's highest index is at least 64Ki vertices past the largest per-vertex record count, every index past that count is moved to it in a copy of the indices, so the zero-padded vertex copies are not sized to the original index (PPSA04159 draws a list of `0xffffffff` with primitive restart off, which asked for 160 GiB). Each attribute fetched by vertex index reads zeros there as at the original index (out-of-bounds select 0 or 1); a draw with another out-of-bounds select keeps its indices. The vertex index the shader sees changes for the moved indices, which a shader that reads it directly would notice
|
||||
- [sceVideoOutGetOutputStatusWithVrr](../../core/libs/prx/libSceVideoOut/Unimplemented.cpp) (libSceVideoOut, NID `gWT7X8H0bYs`) - the name hashes to the imported NID. PPSA26344 version 02.002.000 passes a VideoOut handle and an output pointer at three call sites. It compares a 32-bit value at byte 4 with 2, tests bit 0x10 at byte 16, and, when set, compares low 16-bit values at bytes 48, 50 and 52 with 48, 60 and 120. The full output layout, size, field meanings and console errors are unknown. Every call throws without reading or writing caller memory.
|
||||
- [sceHttp2WebSocketSetPingInterval](../../core/libs/prx/libSceHttp2/Export.cpp) (libSceHttp2, NID `YfaXPnc8PJE`) - imported by `libdiscord_partner_sdk.prx` of PPSA23126 (issue 2648). The parameters, the unit of the interval and the console errors are unknown. Every call throws.
|
||||
- [sceHttp2DeleteCookieBox](../../core/libs/prx/libSceHttp2/Export.cpp) (libSceHttp2) - imported by PPSA35943's Unity player. The `(int cookieBoxId)` signature follows [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/Net/Http2.cs#L215-L217). A box `sceHttp2CreateCookieBox` returned is discarded; an unknown or already deleted id returns the library's invalid-id error (0x817B1100), as [prosper](https://github.com/mattias800/prosper/blob/b1bec57186a0/prosper/src/hle/net/hle_http2.cpp#L512-L523) does; not measured on a console
|
||||
- [sceKernelGetProsperoSystemSwVersion](../../core/libs/prx/libkernel/System/src/SoftwareVersion.cpp) (libkernel) reports system software version `0x01000000` ("01.000.000"); the console's firmware version is not modeled. The 0x28-byte block (a 64-bit size at 0, the version string at 8 and the packed version at 0x24) follows [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/main/src/SharpProspero/Interop/Kernel/KernelSystem.cs), which Prospero Multi Tools (PPSA99110) and Prospero Explorer (PPSA99109) are built with and which sets the size to 40, and the same fields in [etaHEN](https://github.com/etaHEN/etaHEN/blob/main/Source%20Code/daemon/include/ipc.hpp) and [shsrv](https://github.com/ps5-payload-dev/shsrv/blob/master/sh.c). A size other than 0x28 returns `SCE_KERNEL_ERROR_EINVAL` without writing; whether the console checks the size is unverified, since etaHEN and shsrv declare a 0x30-byte block and do not set it
|
||||
- [sceKernelGetAllowedSdkVersionOnSystem](../../core/libs/prx/libkernel/System/src/SoftwareVersion.cpp) (libkernel) reports the system software version with the 12 patch bits set, `0x01000fff`, as [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/98fd0689/src/core/libraries/kernel/kernel.cpp) does on the PS4 and as [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/main/src/SharpProspero/Interop/Kernel/KernelSystem.cs) describes it, which Prospero Explorer (PPSA99109) reads it through; a null pointer returns `SCE_KERNEL_ERROR_EINVAL`. The console's value and its errors are unverified
|
||||
- [sceSystemServiceLaunchApp](../../core/libs/prx/libSceSystemService/Export.cpp) (libSceSystemService) - AnyPS5 runs one title and cannot start another, so every call throws without reading its arguments. The (title ID, null-terminated argv, launch parameters) signature follows [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/SystemService/SystemService.cs#L141-L148), whose `AppLauncher` Prospero Explorer (PPSA99109) and Prospero Multi Tools (PPSA99110) import it through and which passes a 0x20-byte launch context or null; the console's argument checks and errors are unknown
|
||||
|
|
|
|||
Loading…
Reference in New Issue