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

Unified Diff: net/udp/udp_socket_win.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/udp/udp_socket_libevent.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/udp/udp_socket_win.cc
diff --git a/net/udp/udp_socket_win.cc b/net/udp/udp_socket_win.cc
index b1c5846a39408a197af81c7f9763d0ff028713ff..c3fd561e2e1823b3a1c9020723563eccf73973df 100644
--- a/net/udp/udp_socket_win.cc
+++ b/net/udp/udp_socket_win.cc
@@ -615,7 +615,7 @@ int UDPSocketWin::SetSocketOptions() {
int UDPSocketWin::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(WSAGetLastError()) : rv;
}
@@ -720,7 +720,7 @@ int UDPSocketWin::LeaveGroup(
int UDPSocketWin::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;
@@ -731,7 +731,7 @@ int UDPSocketWin::SetMulticastTimeToLive(int time_to_live) {
int UDPSocketWin::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/udp/udp_socket_libevent.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698