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

Unified Diff: trunk/src/net/udp/udp_socket_libevent.cc

Issue 227083002: Revert 261966 "make SetReceiveBufferSize and SetSendBufferSize r..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 | « trunk/src/net/udp/udp_socket_libevent.h ('k') | trunk/src/net/udp/udp_socket_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/net/udp/udp_socket_libevent.cc
===================================================================
--- trunk/src/net/udp/udp_socket_libevent.cc (revision 262001)
+++ trunk/src/net/udp/udp_socket_libevent.cc (working copy)
@@ -315,22 +315,20 @@
return rv;
}
-int UDPSocketLibevent::SetReceiveBufferSize(int32 size) {
+bool UDPSocketLibevent::SetReceiveBufferSize(int32 size) {
DCHECK(CalledOnValidThread());
int rv = setsockopt(socket_, SOL_SOCKET, SO_RCVBUF,
reinterpret_cast<const char*>(&size), sizeof(size));
- int last_error = errno;
- DCHECK(!rv) << "Could not set socket receive buffer size: " << last_error;
- return rv == 0 ? OK : MapSystemError(last_error);
+ DCHECK(!rv) << "Could not set socket receive buffer size: " << errno;
+ return rv == 0;
}
-int UDPSocketLibevent::SetSendBufferSize(int32 size) {
+bool UDPSocketLibevent::SetSendBufferSize(int32 size) {
DCHECK(CalledOnValidThread());
int rv = setsockopt(socket_, SOL_SOCKET, SO_SNDBUF,
reinterpret_cast<const char*>(&size), sizeof(size));
- int last_error = errno;
- DCHECK(!rv) << "Could not set socket send buffer size: " << last_error;
- return rv == 0 ? OK : MapSystemError(last_error);
+ DCHECK(!rv) << "Could not set socket send buffer size: " << errno;
+ return rv == 0;
}
void UDPSocketLibevent::AllowAddressReuse() {
« no previous file with comments | « trunk/src/net/udp/udp_socket_libevent.h ('k') | trunk/src/net/udp/udp_socket_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698