ws2_32: warn the user if broadcasts are failing because of a missing route to 255.255.255.255
Austin English
austinenglish at gmail.com
Mon Feb 8 14:11:02 CST 2010
On Mon, Feb 8, 2010 at 2:07 PM, Damjan Jovanovic <damjan.jov at gmail.com> wrote:
> Changelog:
> * ws2_32: warn the user if broadcasts are failing because of a missing
> route to 255.255.255.255
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 9a65cb0..ac55e50 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -1430,7 +1431,13 @@ static int WS2_send( int fd, struct ws2_async *wsa )
hdr.msg_flags = 0;
#endif
- return sendmsg(fd, &hdr, wsa->flags);
+ ret = sendmsg(fd, &hdr, wsa->flags);
+ if (ret < 0 && errno == ENETUNREACH && wsa->addr &&
wsa->addr->sa_family == AF_INET &&
+ ((struct WS_sockaddr_in*)wsa->addr)->sin_addr.WS_s_addr == 0xFFFFFFFF)
+ {
+ FIXME("broadcast failed, you need to add a route to
255.255.255.255\n");
That doesn't look like a WARN() to me. Anyway, it seems an ERR() would
be more appropriate.
--
-Austin
More information about the wine-devel
mailing list