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

Unified Diff: net/udp/udp_socket_libevent.cc

Issue 14666002: Adding ERR_SOCKET_IS_CONNECTED. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to origin/master Created 7 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
« no previous file with comments | « net/base/net_errors_win.cc ('k') | net/udp/udp_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/udp/udp_socket_libevent.cc
diff --git a/net/udp/udp_socket_libevent.cc b/net/udp/udp_socket_libevent.cc
index f713786c11b4761e1bb79099308688ffd133c72b..4520c47a9461f2f2522bc38ad2842fa5d7cc12a8 100644
--- a/net/udp/udp_socket_libevent.cc
+++ b/net/udp/udp_socket_libevent.cc
@@ -522,7 +522,7 @@ int UDPSocketLibevent::SetSocketOptions() {
int UDPSocketLibevent::DoBind(const IPEndPoint& address) {
SockaddrStorage storage;
if (!address.ToSockAddr(storage.addr, &storage.addr_len))
- return ERR_UNEXPECTED;
+ return ERR_ADDRESS_INVALID;
int rv = bind(socket_, storage.addr, storage.addr_len);
return rv < 0 ? MapSystemError(errno) : rv;
}
@@ -617,7 +617,7 @@ int UDPSocketLibevent::LeaveGroup(const IPAddressNumber& group_address) const {
int UDPSocketLibevent::SetMulticastTimeToLive(int time_to_live) {
DCHECK(CalledOnValidThread());
if (is_connected())
- return ERR_UNEXPECTED;
+ return ERR_SOCKET_IS_CONNECTED;
if (time_to_live < 0 || time_to_live > 255)
return ERR_INVALID_ARGUMENT;
@@ -628,7 +628,7 @@ int UDPSocketLibevent::SetMulticastTimeToLive(int time_to_live) {
int UDPSocketLibevent::SetMulticastLoopbackMode(bool loopback) {
DCHECK(CalledOnValidThread());
if (is_connected())
- return ERR_UNEXPECTED;
+ return ERR_SOCKET_IS_CONNECTED;
if (loopback)
socket_options_ |= SOCKET_OPTION_MULTICAST_LOOP;
« no previous file with comments | « net/base/net_errors_win.cc ('k') | net/udp/udp_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698