Index: content/browser/renderer_host/p2p/socket_host_udp.cc |
diff --git a/content/browser/renderer_host/p2p/socket_host_udp.cc b/content/browser/renderer_host/p2p/socket_host_udp.cc |
index db17c5f6f3fa3b4d8b565015cead895f122e2755..38f5957523a34f3f7dd5b0474bfaf592f1032203 100644 |
--- a/content/browser/renderer_host/p2p/socket_host_udp.cc |
+++ b/content/browser/renderer_host/p2p/socket_host_udp.cc |
@@ -95,7 +95,7 @@ bool P2PSocketHostUdp::Init(const net::IPEndPoint& local_address, |
} |
// Setting recv socket buffer size. |
- if (!socket_->SetReceiveBufferSize(kRecvSocketBufferSize)) { |
+ if (socket_->SetReceiveBufferSize(kRecvSocketBufferSize) != net::OK) { |
LOG(WARNING) << "Failed to set socket receive buffer size to " |
<< kRecvSocketBufferSize; |
} |
@@ -302,9 +302,9 @@ bool P2PSocketHostUdp::SetOption(P2PSocketOption option, int value) { |
DCHECK_EQ(STATE_OPEN, state_); |
switch (option) { |
case P2P_SOCKET_OPT_RCVBUF: |
- return socket_->SetReceiveBufferSize(value); |
+ return socket_->SetReceiveBufferSize(value) == net::OK; |
case P2P_SOCKET_OPT_SNDBUF: |
- return socket_->SetSendBufferSize(value); |
+ return socket_->SetSendBufferSize(value) == net::OK; |
case P2P_SOCKET_OPT_DSCP: |
return (net::OK == socket_->SetDiffServCodePoint( |
static_cast<net::DiffServCodePoint>(value))) ? true : false; |