diff options
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/jingle_glue/chromium_socket_factory.cc | 8 | ||||
-rw-r--r-- | remoting/protocol/channel_multiplexer.cc | 14 | ||||
-rw-r--r-- | remoting/protocol/fake_session.cc | 20 | ||||
-rw-r--r-- | remoting/protocol/fake_session.h | 8 |
4 files changed, 26 insertions, 24 deletions
diff --git a/remoting/jingle_glue/chromium_socket_factory.cc b/remoting/jingle_glue/chromium_socket_factory.cc index 24cda6e..c88833f 100644 --- a/remoting/jingle_glue/chromium_socket_factory.cc +++ b/remoting/jingle_glue/chromium_socket_factory.cc @@ -225,13 +225,13 @@ int UdpPacketSocket::SetOption(talk_base::Socket::Option option, int value) { return -1; case talk_base::Socket::OPT_RCVBUF: { - bool success = socket_->SetReceiveBufferSize(value); - return success ? 0 : -1; + int net_error = socket_->SetReceiveBufferSize(value); + return (net_error == net::OK) ? 0 : -1; } case talk_base::Socket::OPT_SNDBUF: { - bool success = socket_->SetSendBufferSize(value); - return success ? 0 : -1; + int net_error = socket_->SetSendBufferSize(value); + return (net_error == net::OK) ? 0 : -1; } case talk_base::Socket::OPT_NODELAY: diff --git a/remoting/protocol/channel_multiplexer.cc b/remoting/protocol/channel_multiplexer.cc index 2988f22..bf4def4 100644 --- a/remoting/protocol/channel_multiplexer.cc +++ b/remoting/protocol/channel_multiplexer.cc @@ -116,18 +116,18 @@ class ChannelMultiplexer::MuxSocket : public net::StreamSocket, virtual int Write(net::IOBuffer* buffer, int buffer_len, const net::CompletionCallback& callback) OVERRIDE; - virtual bool SetReceiveBufferSize(int32 size) OVERRIDE { + virtual int SetReceiveBufferSize(int32 size) OVERRIDE { NOTIMPLEMENTED(); - return false; + return net::ERR_NOT_IMPLEMENTED; } - virtual bool SetSendBufferSize(int32 size) OVERRIDE { + virtual int SetSendBufferSize(int32 size) OVERRIDE { NOTIMPLEMENTED(); - return false; + return net::ERR_NOT_IMPLEMENTED; } virtual int Connect(const net::CompletionCallback& callback) OVERRIDE { NOTIMPLEMENTED(); - return net::ERR_FAILED; + return net::ERR_NOT_IMPLEMENTED; } virtual void Disconnect() OVERRIDE { NOTIMPLEMENTED(); @@ -142,11 +142,11 @@ class ChannelMultiplexer::MuxSocket : public net::StreamSocket, } virtual int GetPeerAddress(net::IPEndPoint* address) const OVERRIDE { NOTIMPLEMENTED(); - return net::ERR_FAILED; + return net::ERR_NOT_IMPLEMENTED; } virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE { NOTIMPLEMENTED(); - return net::ERR_FAILED; + return net::ERR_NOT_IMPLEMENTED; } virtual const net::BoundNetLog& NetLog() const OVERRIDE { NOTIMPLEMENTED(); diff --git a/remoting/protocol/fake_session.cc b/remoting/protocol/fake_session.cc index 1ce0675..213ae0b 100644 --- a/remoting/protocol/fake_session.cc +++ b/remoting/protocol/fake_session.cc @@ -136,13 +136,14 @@ void FakeSocket::DoWrite(net::IOBuffer* buf, int buf_len) { } } -bool FakeSocket::SetReceiveBufferSize(int32 size) { +int FakeSocket::SetReceiveBufferSize(int32 size) { NOTIMPLEMENTED(); - return false; + return net::ERR_NOT_IMPLEMENTED; } -bool FakeSocket::SetSendBufferSize(int32 size) { + +int FakeSocket::SetSendBufferSize(int32 size) { NOTIMPLEMENTED(); - return false; + return net::ERR_NOT_IMPLEMENTED; } int FakeSocket::Connect(const net::CompletionCallback& callback) { @@ -172,7 +173,7 @@ int FakeSocket::GetPeerAddress(net::IPEndPoint* address) const { int FakeSocket::GetLocalAddress(net::IPEndPoint* address) const { NOTIMPLEMENTED(); - return net::ERR_FAILED; + return net::ERR_NOT_IMPLEMENTED; } const net::BoundNetLog& FakeSocket::NetLog() const { @@ -263,13 +264,14 @@ int FakeUdpSocket::Write(net::IOBuffer* buf, int buf_len, return buf_len; } -bool FakeUdpSocket::SetReceiveBufferSize(int32 size) { +int FakeUdpSocket::SetReceiveBufferSize(int32 size) { NOTIMPLEMENTED(); - return false; + return net::ERR_NOT_IMPLEMENTED; } -bool FakeUdpSocket::SetSendBufferSize(int32 size) { + +int FakeUdpSocket::SetSendBufferSize(int32 size) { NOTIMPLEMENTED(); - return false; + return net::ERR_NOT_IMPLEMENTED; } FakeSession::FakeSession() diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h index 471b336..01f79c7 100644 --- a/remoting/protocol/fake_session.h +++ b/remoting/protocol/fake_session.h @@ -58,8 +58,8 @@ class FakeSocket : public net::StreamSocket { virtual int Write(net::IOBuffer* buf, int buf_len, const net::CompletionCallback& callback) OVERRIDE; - virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; - virtual bool SetSendBufferSize(int32 size) OVERRIDE; + virtual int SetReceiveBufferSize(int32 size) OVERRIDE; + virtual int SetSendBufferSize(int32 size) OVERRIDE; // net::StreamSocket interface. virtual int Connect(const net::CompletionCallback& callback) OVERRIDE; @@ -127,8 +127,8 @@ class FakeUdpSocket : public net::Socket { virtual int Write(net::IOBuffer* buf, int buf_len, const net::CompletionCallback& callback) OVERRIDE; - virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; - virtual bool SetSendBufferSize(int32 size) OVERRIDE; + virtual int SetReceiveBufferSize(int32 size) OVERRIDE; + virtual int SetSendBufferSize(int32 size) OVERRIDE; private: bool read_pending_; |