Index: runtime/bin/eventhandler_win.cc |
diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc |
index 43a686d8536e7bbcc7d23afebd0df0262843834d..0d47297886efcbbd4987a0576e03d33beb9699ae 100644 |
--- a/runtime/bin/eventhandler_win.cc |
+++ b/runtime/bin/eventhandler_win.cc |
@@ -539,7 +539,7 @@ void ListenSocket::AcceptComplete(OverlappedBuffer* buffer, |
SOCKET s = socket(); |
int rc = setsockopt(buffer->client(), SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT, |
reinterpret_cast<char*>(&s), sizeof(s)); |
- if (rc == NO_ERROR) { |
+ if (rc == MX_OK) { |
zra
2017/06/09 19:24:25
This is a Windows file =)
|
// Insert the accepted socket into the list. |
ClientSocket* client_socket = new ClientSocket(buffer->client()); |
client_socket->mark_connected(); |
@@ -939,7 +939,7 @@ bool ClientSocket::IssueRead() { |
flags = 0; |
int rc = WSARecv(socket(), buffer->GetWASBUF(), 1, NULL, &flags, |
buffer->GetCleanOverlapped(), NULL); |
- if ((rc == NO_ERROR) || (WSAGetLastError() == WSA_IO_PENDING)) { |
+ if ((rc == MX_OK) || (WSAGetLastError() == WSA_IO_PENDING)) { |
pending_read_ = buffer; |
return true; |
} |
@@ -958,7 +958,7 @@ bool ClientSocket::IssueWrite() { |
int rc = WSASend(socket(), pending_write_->GetWASBUF(), 1, NULL, 0, |
pending_write_->GetCleanOverlapped(), NULL); |
- if ((rc == NO_ERROR) || (WSAGetLastError() == WSA_IO_PENDING)) { |
+ if ((rc == MX_OK) || (WSAGetLastError() == WSA_IO_PENDING)) { |
return true; |
} |
OverlappedBuffer::DisposeBuffer(pending_write_); |
@@ -1045,7 +1045,7 @@ bool DatagramSocket::IssueSendTo(struct sockaddr* sa, socklen_t sa_len) { |
int rc = WSASendTo(socket(), pending_write_->GetWASBUF(), 1, NULL, 0, sa, |
sa_len, pending_write_->GetCleanOverlapped(), NULL); |
- if ((rc == NO_ERROR) || (WSAGetLastError() == WSA_IO_PENDING)) { |
+ if ((rc == MX_OK) || (WSAGetLastError() == WSA_IO_PENDING)) { |
return true; |
} |
OverlappedBuffer::DisposeBuffer(pending_write_); |
@@ -1068,7 +1068,7 @@ bool DatagramSocket::IssueRecvFrom() { |
int rc = WSARecvFrom(socket(), buffer->GetWASBUF(), 1, NULL, &flags, |
buffer->from(), buffer->from_len_addr(), |
buffer->GetCleanOverlapped(), NULL); |
- if ((rc == NO_ERROR) || (WSAGetLastError() == WSA_IO_PENDING)) { |
+ if ((rc == MX_OK) || (WSAGetLastError() == WSA_IO_PENDING)) { |
pending_read_ = buffer; |
return true; |
} |