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

Unified Diff: remoting/jingle_glue/chromium_socket_factory.cc

Issue 227473008: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Original CL, as was submitted, and previously reverted 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
Index: remoting/jingle_glue/chromium_socket_factory.cc
diff --git a/remoting/jingle_glue/chromium_socket_factory.cc b/remoting/jingle_glue/chromium_socket_factory.cc
index 24cda6ebe78ba84f75abd2f3457cbffc31daf627..c88833fa9bc167260254001c38a6d7ede0e63386 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:

Powered by Google App Engine
This is Rietveld 408576698