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

Unified Diff: net/udp/udp_socket_libevent.cc

Issue 10917235: SO_REUSEPORT is moved from AddressReuse feature to Broadcast feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/OSX/OS_MACOSX Created 8 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/udp/udp_socket_libevent.cc
diff --git a/net/udp/udp_socket_libevent.cc b/net/udp/udp_socket_libevent.cc
index beb1dcaf87d896064cf6f4ce8220442b94f31a18..a0be9d938403900dda7a8b7d4b6412583fe75adc 100644
--- a/net/udp/udp_socket_libevent.cc
+++ b/net/udp/udp_socket_libevent.cc
@@ -465,16 +465,17 @@ int UDPSocketLibevent::SetSocketOptions() {
sizeof(true_value));
if (rv < 0)
return MapSystemError(errno);
-#if defined(SO_REUSEPORT)
+ }
+ if (socket_options_ & SOCKET_OPTION_BROADCAST) {
+ int rv;
+#if defined(OS_MACOSX) && defined(SO_REUSEPORT)
Sergey Ulanov 2012/09/14 19:38:45 You don't need defined(SO_REUSEPORT) here - we exp
ygorshenin1 2012/09/18 11:34:05 Done.
rv = setsockopt(socket_, SOL_SOCKET, SO_REUSEPORT, &true_value,
Sergey Ulanov 2012/09/14 19:38:45 Please add comments here to explain why we need th
ygorshenin1 2012/09/18 11:34:05 Done.
sizeof(true_value));
if (rv < 0)
return MapSystemError(errno);
-#endif
- }
- if (socket_options_ & SOCKET_OPTION_BROADCAST) {
- int rv = setsockopt(socket_, SOL_SOCKET, SO_BROADCAST, &true_value,
- sizeof(true_value));
+#endif // defined(OS_MACOSX) && defined(SO_REUSEPORT)
+ rv = setsockopt(socket_, SOL_SOCKET, SO_BROADCAST, &true_value,
+ sizeof(true_value));
if (rv < 0)
return MapSystemError(errno);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698