Chromium Code Reviews| 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..60131d4b195790cbbea70a4af48e684106504076 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_SEND_BUFFER_SIZE_ERROR; |
|
wtc
2014/03/29 13:30:12
BUG: the error code should be ...RECEIVE_BUFFER...
jar (doing other things)
2014/04/01 23:50:39
Done.
|
| } |
| -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) { |