Skip to content
Snippets Groups Projects
Commit ef2eae0a authored by rswindell's avatar rswindell
Browse files

Fixed compile error:

Type mismatch in parameter 'optlen' (wanted 'int *', got 'unsigned int') in function nonblocking_connect
parent c65e7ca9
No related branches found
No related tags found
No related merge requests found
......@@ -373,12 +373,13 @@ int nonblocking_connect(SOCKET sock, struct sockaddr* addr, size_t size, unsigne
&& (ERROR_VALUE==EWOULDBLOCK || ERROR_VALUE==EINPROGRESS)) {
fd_set socket_set;
struct timeval tv;
socklen_t optlen=sizeof(result);
tv.tv_sec = timeout;
tv.tv_usec = 0;
FD_ZERO(&socket_set);
FD_SET(sock,&socket_set);
if(select(sock,NULL,&socket_set,NULL,&tv)==1)
getsockopt(sock, SOL_SOCKET, SO_ERROR, &result, sizeof(result));
getsockopt(sock, SOL_SOCKET, SO_ERROR, (void*)&result, &optlen);
}
return result;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment