Index: jingle/glue/channel_socket_adapter.cc |
diff --git a/jingle/glue/channel_socket_adapter.cc b/jingle/glue/channel_socket_adapter.cc |
index 40ed12c7cd9856a184426d46c7645acd3073e7c1..bca4222aaeb0421d079c8de099137a22c8f516b5 100644 |
--- a/jingle/glue/channel_socket_adapter.cc |
+++ b/jingle/glue/channel_socket_adapter.cc |
@@ -99,14 +99,16 @@ int TransportChannelSocketAdapter::Write( |
return result; |
} |
-bool TransportChannelSocketAdapter::SetReceiveBufferSize(int32 size) { |
+int TransportChannelSocketAdapter::SetReceiveBufferSize(int32 size) { |
DCHECK_EQ(base::MessageLoop::current(), message_loop_); |
- return channel_->SetOption(talk_base::Socket::OPT_RCVBUF, size) == 0; |
+ return (channel_->SetOption(talk_base::Socket::OPT_RCVBUF, size) == 0) ? |
+ net::OK : net::ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR; |
} |
-bool TransportChannelSocketAdapter::SetSendBufferSize(int32 size) { |
+int TransportChannelSocketAdapter::SetSendBufferSize(int32 size) { |
DCHECK_EQ(base::MessageLoop::current(), message_loop_); |
- return channel_->SetOption(talk_base::Socket::OPT_SNDBUF, size) == 0; |
+ return (channel_->SetOption(talk_base::Socket::OPT_SNDBUF, size) == 0) ? |
+ net::OK : net::ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR; |
} |
void TransportChannelSocketAdapter::Close(int error_code) { |