Merge "Use SO_SNDBUFFORCE instead of SO_SNDBUF" into oc-dev

This commit is contained in:
TreeHugger Robot 2017-05-17 02:26:00 +00:00 committed by Android (Google) Code Review
commit 165dad791d

View file

@ -141,8 +141,8 @@ bool SetupMessageSockets(base::unique_fd (*result)[2]) {
}
constexpr int kMaxMessageSize = sizeof(FuseBuffer);
if (setsockopt(fds[0], SOL_SOCKET, SO_SNDBUF, &kMaxMessageSize, sizeof(int)) != 0 ||
setsockopt(fds[1], SOL_SOCKET, SO_SNDBUF, &kMaxMessageSize, sizeof(int)) != 0) {
if (setsockopt(fds[0], SOL_SOCKET, SO_SNDBUFFORCE, &kMaxMessageSize, sizeof(int)) != 0 ||
setsockopt(fds[1], SOL_SOCKET, SO_SNDBUFFORCE, &kMaxMessageSize, sizeof(int)) != 0) {
PLOG(ERROR) << "Failed to update buffer size for socket";
return false;
}