gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r36092 - libmicrohttpd/src/microhttpd
Date: Thu, 16 Jul 2015 11:37:46 +0200

Author: grothoff
Date: 2015-07-16 11:37:46 +0200 (Thu, 16 Jul 2015)
New Revision: 36092

Modified:
   libmicrohttpd/src/microhttpd/daemon.c
Log:
-fix sendfile arg calculation

Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c       2015-07-15 17:40:48 UTC (rev 
36091)
+++ libmicrohttpd/src/microhttpd/daemon.c       2015-07-16 09:37:46 UTC (rev 
36092)
@@ -1116,16 +1116,14 @@
 #endif /* HAVE_SENDFILE64 */
       offsetu64 = connection->response_write_position + 
connection->response->fd_off;
       left = connection->response->total_size - 
connection->response_write_position;
-      if (i > left)
-        i = left;
 #ifndef HAVE_SENDFILE64
       offset = (off_t) offsetu64;
       if ( (offsetu64 <= (uint64_t)OFF_T_MAX) &&
-           0 < (ret = sendfile (connection->socket_fd, fd, &offset, i)))
+           0 < (ret = sendfile (connection->socket_fd, fd, &offset, left)))
 #else  /* HAVE_SENDFILE64 */
       offset = (off64_t) offsetu64;
       if ( (offsetu64 <= (uint64_t)OFF64_T_MAX) &&
-          0 < (ret = sendfile64 (connection->socket_fd, fd, &offset, i)))
+          0 < (ret = sendfile64 (connection->socket_fd, fd, &offset, left)))
 #endif /* HAVE_SENDFILE64 */
        {
 #if EPOLL_SUPPORT




reply via email to

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