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

Unified Diff: native_client_sdk/src/libraries/nacl_io/mount_node_socket.cc

Issue 99813004: [NaCl SDK] nacl_io: implement set/getsockopt for TCP_NODELAY. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/nacl_io/mount_node_tcp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/nacl_io/mount_node_socket.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/mount_node_socket.cc b/native_client_sdk/src/libraries/nacl_io/mount_node_socket.cc
index f5c20c1b0a5092cb1d370db4f7415a16bb9b892f..d137e0706b7cafabd86ed9ec69642b1572264736 100644
--- a/native_client_sdk/src/libraries/nacl_io/mount_node_socket.cc
+++ b/native_client_sdk/src/libraries/nacl_io/mount_node_socket.cc
@@ -226,6 +226,8 @@ Error MountNodeSocket::GetSockOpt(int lvl,
if (lvl != SOL_SOCKET)
return ENOPROTOOPT;
+ AUTO_LOCK(node_lock_);
+
int value = 0;
socklen_t value_len = 0;
void* value_ptr = NULL;
@@ -270,6 +272,8 @@ Error MountNodeSocket::SetSockOpt(int lvl,
if (lvl != SOL_SOCKET)
return ENOPROTOOPT;
+ AUTO_LOCK(node_lock_);
+
switch (optname) {
case SO_REUSEADDR: {
// SO_REUSEADDR is effectivly always on since we can't
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/nacl_io/mount_node_tcp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698