diff --git a/libappfuse/FuseBuffer.cc b/libappfuse/FuseBuffer.cc index 1eab46cb4..1915f22ba 100644 --- a/libappfuse/FuseBuffer.cc +++ b/libappfuse/FuseBuffer.cc @@ -149,8 +149,8 @@ bool SetupMessageSockets(base::unique_fd (*result)[2]) { } constexpr int kMaxMessageSize = sizeof(FuseBuffer); - if (setsockopt(fds[0], SOL_SOCKET, SO_SNDBUFFORCE, &kMaxMessageSize, sizeof(int)) != 0 || - setsockopt(fds[1], SOL_SOCKET, SO_SNDBUFFORCE, &kMaxMessageSize, sizeof(int)) != 0) { + if (setsockopt(fds[0], SOL_SOCKET, SO_SNDBUF, &kMaxMessageSize, sizeof(int)) != 0 || + setsockopt(fds[1], SOL_SOCKET, SO_SNDBUF, &kMaxMessageSize, sizeof(int)) != 0) { PLOG(ERROR) << "Failed to update buffer size for socket"; return false; } diff --git a/libappfuse/include/libappfuse/FuseBuffer.h b/libappfuse/include/libappfuse/FuseBuffer.h index 7a70bf3b4..30638155f 100644 --- a/libappfuse/include/libappfuse/FuseBuffer.h +++ b/libappfuse/include/libappfuse/FuseBuffer.h @@ -25,7 +25,7 @@ namespace fuse { // The numbers came from sdcard.c. // Maximum number of bytes to write/read in one request/one reply. -constexpr size_t kFuseMaxWrite = 256 * 1024; +constexpr size_t kFuseMaxWrite = 128 * 1024; constexpr size_t kFuseMaxRead = 128 * 1024; constexpr int32_t kFuseSuccess = 0;