gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r34391 - libmicrohttpd/src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r34391 - libmicrohttpd/src/microhttpd
Date: Wed, 29 Oct 2014 16:53:17 +0100

Author: grothoff
Date: 2014-10-29 16:53:17 +0100 (Wed, 29 Oct 2014)
New Revision: 34391

Modified:
   libmicrohttpd/src/microhttpd/daemon.c
Log:
handle bogus return value from send() call

Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c       2014-10-29 15:46:17 UTC (rev 
34390)
+++ libmicrohttpd/src/microhttpd/daemon.c       2014-10-29 15:53:17 UTC (rev 
34391)
@@ -1037,6 +1037,11 @@
       connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY;
     }
 #endif
+  /* Handle broken kernel / libc, returning -1 but not setting errno;
+     kill connection as that should be safe; reported on mailinglist here:
+     http://lists.gnu.org/archive/html/libmicrohttpd/2014-10/msg00023.html */
+  if ( (-1 == ret) && (0 == errno) )
+    errno = ECONNRESET;
   return ret;
 }
 




reply via email to

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