X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8b0107e452db7a418ed54ec04b1bcb0084df19b9..ef0368834fd9f80de27e1449cfdb767d59410a65:/src/msw/gsocket.c diff --git a/src/msw/gsocket.c b/src/msw/gsocket.c index 20c11ad591..86cfc7b913 100644 --- a/src/msw/gsocket.c +++ b/src/msw/gsocket.c @@ -780,7 +780,7 @@ GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags) FD_ZERO(&writefds); FD_ZERO(&exceptfds); FD_SET(socket->m_fd, &readfds); - if (flags & GSOCK_OUTPUT_FLAG) + if (flags & GSOCK_OUTPUT_FLAG || flags & GSOCK_CONNECTION_FLAG) FD_SET(socket->m_fd, &writefds); FD_SET(socket->m_fd, &exceptfds); @@ -1361,7 +1361,7 @@ GSocketError GAddress_INET_SetHostAddress(GAddress *address, CHECK_ADDRESS(address, INET); addr = &(((struct sockaddr_in *)address->m_addr)->sin_addr); - addr->s_addr = hostaddr; + addr->s_addr = htonl(hostaddr);; return GSOCK_NOERROR; } @@ -1450,7 +1450,7 @@ unsigned long GAddress_INET_GetHostAddress(GAddress *address) addr = (struct sockaddr_in *)address->m_addr; - return addr->sin_addr.s_addr; + return ntohl(addr->sin_addr.s_addr); } unsigned short GAddress_INET_GetPort(GAddress *address)