diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-08 18:20:38 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-08 18:20:38 +0000 |
commit | 44fabc12da537bbe3c44eb3b150d8acabe505170 (patch) | |
tree | 87ad12f9aed4a53862f30aa972da43553a332ade /src | |
parent | fcf84f917c9fd950444bf87aafebb3bed13ada03 (diff) | |
download | gnunet-44fabc12da537bbe3c44eb3b150d8acabe505170.tar.gz gnunet-44fabc12da537bbe3c44eb3b150d8acabe505170.zip |
-LRN: fix udp plugin on W32
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index c5a4c7b3d..ad87ea68d 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -1741,8 +1741,15 @@ udp_select_read (struct Plugin *plugin, struct GNUNET_NETWORK_Handle *rsock) | |||
1741 | memset (&addr, 0, sizeof (addr)); | 1741 | memset (&addr, 0, sizeof (addr)); |
1742 | size = GNUNET_NETWORK_socket_recvfrom (rsock, buf, sizeof (buf), | 1742 | size = GNUNET_NETWORK_socket_recvfrom (rsock, buf, sizeof (buf), |
1743 | (struct sockaddr *) &addr, &fromlen); | 1743 | (struct sockaddr *) &addr, &fromlen); |
1744 | 1744 | #if MINGW | |
1745 | if (size < sizeof (struct GNUNET_MessageHeader)) | 1745 | /* On SOCK_DGRAM UDP sockets recvfrom might fail with a |
1746 | * WSAECONNRESET error to indicate that previous sendto() (???) | ||
1747 | * on this socket has failed. | ||
1748 | */ | ||
1749 | if ( (-1 == size) && (ECONNRESET == errno) ) | ||
1750 | return; | ||
1751 | #endif | ||
1752 | if ( (-1 == size) || (size < sizeof (struct GNUNET_MessageHeader))) | ||
1746 | { | 1753 | { |
1747 | GNUNET_break_op (0); | 1754 | GNUNET_break_op (0); |
1748 | return; | 1755 | return; |