From d789b2d2e6b8d4786437fcbb0af5e4fce4d9c4b2 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sat, 25 Sep 2021 08:47:32 +0200 Subject: [PATCH] early-access version 2084 --- README.md | 2 +- src/core/hle/service/sockets/bsd.cpp | 15 ++++++++++++++- src/core/hle/service/sockets/bsd.h | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 56c2ae965..d3a3f9494 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2083. +This is the source code for early-access 2084. ## Legal Notice diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 7d85ecb6a..95a70dfd3 100755 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp @@ -415,6 +415,19 @@ void BSD::Write(Kernel::HLERequestContext& ctx) { }); } +void BSD::Read(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const s32 fd = rp.Pop(); + + LOG_DEBUG(Service, "called. fd={} len={}", fd, ctx.GetWriteBufferSize()); + + ExecuteWork(ctx, RecvWork{ + .fd = fd, + .flags = 0, + .message = std::vector(ctx.GetWriteBufferSize()), + }); +} + void BSD::Close(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const s32 fd = rp.Pop(); @@ -855,7 +868,7 @@ BSD::BSD(Core::System& system_, const char* name) : ServiceFramework{system_, na {22, &BSD::Shutdown, "Shutdown"}, {23, nullptr, "ShutdownAllSockets"}, {24, &BSD::Write, "Write"}, - {25, nullptr, "Read"}, + {25, &BSD::Read, "Read"}, {26, &BSD::Close, "Close"}, {27, nullptr, "DuplicateSocket"}, {28, nullptr, "GetResourceStatistics"}, diff --git a/src/core/hle/service/sockets/bsd.h b/src/core/hle/service/sockets/bsd.h index 1d2df9c61..d68beef5c 100755 --- a/src/core/hle/service/sockets/bsd.h +++ b/src/core/hle/service/sockets/bsd.h @@ -135,6 +135,7 @@ private: void Send(Kernel::HLERequestContext& ctx); void SendTo(Kernel::HLERequestContext& ctx); void Write(Kernel::HLERequestContext& ctx); + void Read(Kernel::HLERequestContext& ctx); void Close(Kernel::HLERequestContext& ctx); void EventFd(Kernel::HLERequestContext& ctx);