gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r21809 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r21809 - gnunet/src/transport
Date: Fri, 8 Jun 2012 20:20:39 +0200

Author: grothoff
Date: 2012-06-08 20:20:38 +0200 (Fri, 08 Jun 2012)
New Revision: 21809

Modified:
   gnunet/src/transport/plugin_transport_udp.c
Log:
-LRN: fix udp plugin on W32

Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2012-06-08 16:38:30 UTC (rev 
21808)
+++ gnunet/src/transport/plugin_transport_udp.c 2012-06-08 18:20:38 UTC (rev 
21809)
@@ -1741,8 +1741,15 @@
   memset (&addr, 0, sizeof (addr));
   size = GNUNET_NETWORK_socket_recvfrom (rsock, buf, sizeof (buf),
                                       (struct sockaddr *) &addr, &fromlen);
-
-  if (size < sizeof (struct GNUNET_MessageHeader))
+#if MINGW
+  /* On SOCK_DGRAM UDP sockets recvfrom might fail with a
+   * WSAECONNRESET error to indicate that previous sendto() (???)
+   * on this socket has failed.
+   */
+  if ( (-1 == size) && (ECONNRESET == errno) )
+    return;
+#endif
+  if ( (-1 == size) || (size < sizeof (struct GNUNET_MessageHeader)))
   {
     GNUNET_break_op (0);
     return;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]