summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-07-06 17:19:58 +0200
committerbunnei <bunneidev@gmail.com>2015-07-06 17:19:58 +0200
commitc19f9945b76f80e39f6f2c797f204b61eb871c20 (patch)
treefa52c5589a662778d502917dc8618b1dffc68b0b /src/core/hle/service
parentMerge pull request #897 from lioncash/return (diff)
parentServices/SOC: Added command headers to some of the soc commands. (diff)
downloadyuzu-c19f9945b76f80e39f6f2c797f204b61eb871c20.tar
yuzu-c19f9945b76f80e39f6f2c797f204b61eb871c20.tar.gz
yuzu-c19f9945b76f80e39f6f2c797f204b61eb871c20.tar.bz2
yuzu-c19f9945b76f80e39f6f2c797f204b61eb871c20.tar.lz
yuzu-c19f9945b76f80e39f6f2c797f204b61eb871c20.tar.xz
yuzu-c19f9945b76f80e39f6f2c797f204b61eb871c20.tar.zst
yuzu-c19f9945b76f80e39f6f2c797f204b61eb871c20.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/soc_u.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/core/hle/service/soc_u.cpp b/src/core/hle/service/soc_u.cpp
index 1e0f5df9b..1bd420552 100644
--- a/src/core/hle/service/soc_u.cpp
+++ b/src/core/hle/service/soc_u.cpp
@@ -328,6 +328,7 @@ static void Socket(Service::Interface* self) {
if ((s32)socket_handle == SOCKET_ERROR_VALUE)
result = TranslateError(GET_ERRNO);
+ cmd_buffer[0] = IPC::MakeHeader(2, 2, 0);
cmd_buffer[1] = result;
cmd_buffer[2] = socket_handle;
}
@@ -351,8 +352,9 @@ static void Bind(Service::Interface* self) {
if (res != 0)
result = TranslateError(GET_ERRNO);
- cmd_buffer[2] = res;
+ cmd_buffer[0] = IPC::MakeHeader(5, 2, 0);
cmd_buffer[1] = result;
+ cmd_buffer[2] = res;
}
static void Fcntl(Service::Interface* self) {
@@ -434,8 +436,9 @@ static void Listen(Service::Interface* self) {
if (ret != 0)
result = TranslateError(GET_ERRNO);
- cmd_buffer[2] = ret;
+ cmd_buffer[0] = IPC::MakeHeader(3, 2, 0);
cmd_buffer[1] = result;
+ cmd_buffer[2] = ret;
}
static void Accept(Service::Interface* self) {
@@ -460,8 +463,10 @@ static void Accept(Service::Interface* self) {
Memory::WriteBlock(cmd_buffer[0x104 >> 2], (const u8*)&ctr_addr, max_addr_len);
}
- cmd_buffer[2] = ret;
+ cmd_buffer[0] = IPC::MakeHeader(4, 2, 2);
cmd_buffer[1] = result;
+ cmd_buffer[2] = ret;
+ cmd_buffer[3] = IPC::StaticBufferDesc(static_cast<u32>(max_addr_len), 0);
}
static void GetHostId(Service::Interface* self) {
@@ -669,8 +674,10 @@ static void Connect(Service::Interface* self) {
int result = 0;
if (ret != 0)
result = TranslateError(GET_ERRNO);
- cmd_buffer[2] = ret;
+
+ cmd_buffer[0] = IPC::MakeHeader(6, 2, 0);
cmd_buffer[1] = result;
+ cmd_buffer[2] = ret;
}
static void InitializeSockets(Service::Interface* self) {
@@ -681,7 +688,8 @@ static void InitializeSockets(Service::Interface* self) {
#endif
u32* cmd_buffer = Kernel::GetCommandBuffer();
- cmd_buffer[1] = 0;
+ cmd_buffer[0] = IPC::MakeHeader(1, 1, 0);
+ cmd_buffer[1] = RESULT_SUCCESS.raw;
}
static void ShutdownSockets(Service::Interface* self) {