mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-09 22:56:35 +00:00
libstratosphere: Fix receive for multi-static IPC buffers
This commit is contained in:
parent
4944986814
commit
781f2597e5
2 changed files with 5 additions and 1 deletions
|
@ -117,7 +117,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
/* TODO: What's a good timeout value to use here? */
|
||||
auto server_manager = std::make_unique<MultiThreadedWaitableManager>(1, U64_MAX, 0x20000);
|
||||
auto server_manager = std::make_unique<MultiThreadedWaitableManager>(5, U64_MAX, 0x20000);
|
||||
//auto server_manager = std::make_unique<WaitableManager>(U64_MAX);
|
||||
|
||||
/* Create fsp-srv mitm. */
|
||||
|
|
|
@ -187,6 +187,10 @@ class ISession : public IWaitable {
|
|||
ipcAddRecvStatic(&c_for_reply, this->pointer_buffer.data(), this->pointer_buffer.size(), 0);
|
||||
ipcPrepareHeader(&c_for_reply, 0);
|
||||
|
||||
/* Fix libnx bug in serverside C descriptor handling. */
|
||||
((u32 *)armGetTls())[1] &= 0xFFFFC3FF;
|
||||
((u32 *)armGetTls())[1] |= (2) << 10;
|
||||
|
||||
if (R_SUCCEEDED(rc = svcReplyAndReceive(&handle_index, &this->server_handle, 1, 0, U64_MAX))) {
|
||||
if (handle_index != 0) {
|
||||
/* TODO: Panic? */
|
||||
|
|
Loading…
Reference in a new issue