Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

windows: set error using WSAGetLastError

  • Loading branch information...
Igor Zinkovsky
Igor Zinkovsky committed Jan 23, 2012
1 parent 726e36c commit edbabe6f83f704aa2f52ef2c33597471bcc5f0f3
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/win/udp.c
@@ -582,7 +582,7 @@ void uv_process_udp_send_req(uv_loop_t* loop, uv_udp_t* handle,
int uv_udp_set_multicast_ttl(uv_udp_t* handle, int ttl) {
if (setsockopt(handle->socket, IPPROTO_IP, IP_MULTICAST_TTL,
(const char*)&ttl, sizeof ttl) == -1) {
uv__set_sys_error(handle->loop, errno);
uv__set_sys_error(handle->loop, WSAGetLastError());
return -1;
}

@@ -593,7 +593,7 @@ int uv_udp_set_multicast_ttl(uv_udp_t* handle, int ttl) {
int uv_udp_set_broadcast(uv_udp_t* handle, int on) {
if (setsockopt(handle->socket, SOL_SOCKET, SO_BROADCAST, (const char*)&on,
sizeof on) == -1) {
uv__set_sys_error(handle->loop, errno);
uv__set_sys_error(handle->loop, WSAGetLastError());
return -1;
}

0 comments on commit edbabe6

Please sign in to comment.
You can’t perform that action at this time.