Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: mojo/edk/embedder/platform_channel_utils_posix.cc

Issue 1585493002: [mojo] Ports EDK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/edk/embedder/platform_channel_utils_posix.cc
diff --git a/mojo/edk/embedder/platform_channel_utils_posix.cc b/mojo/edk/embedder/platform_channel_utils_posix.cc
index ef718d5bcc17627c81b7a2c08007f359a79f3442..c0940e09806fc94227d75da33342f69459e70765 100644
--- a/mojo/edk/embedder/platform_channel_utils_posix.cc
+++ b/mojo/edk/embedder/platform_channel_utils_posix.cc
@@ -160,18 +160,10 @@ ssize_t PlatformChannelRecvmsg(PlatformHandle h,
msg.msg_control = cmsg_buf;
msg.msg_controllen = sizeof(cmsg_buf);
- // We use SO_PEEK_OFF to hold a common identifier between sockets to detect if
- // they're connected. recvmsg modifies it, so we cache it and set it again
- // after the call.
- int id = 0;
- socklen_t peek_off_size = sizeof(id);
- getsockopt(h.handle, SOL_SOCKET, SO_PEEK_OFF, &id, &peek_off_size);
ssize_t result = HANDLE_EINTR(recvmsg(h.handle, &msg, MSG_DONTWAIT));
if (result < 0)
return result;
- setsockopt(h.handle, SOL_SOCKET, SO_PEEK_OFF, &id, sizeof(id));
-
// Success; no control messages.
if (msg.msg_controllen == 0)
return result;

Powered by Google App Engine
This is Rietveld 408576698