Explorar o código

MHD_send_sendfile_: Fixed wrong send size.

Fixed typo, 9e45e2486f4e24552439cef43d61d841229a8fea regression
Evgeny Grin (Karlson2k) %!s(int64=5) %!d(string=hai) anos
pai
achega
736fe430cb
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      src/microhttpd/mhd_send.c

+ 3 - 2
src/microhttpd/mhd_send.c

@@ -1094,14 +1094,15 @@ MHD_send_sendfile_ (struct MHD_Connection *connection)
 
   left = connection->response->total_size - connection->response_write_position;
 
-  if ( (uint64_t) SSIZE_MAX > left)
+  if ( (uint64_t) SSIZE_MAX < left)
     left = SSIZE_MAX;
+
   /* Do not allow system to stick sending on single fast connection:
    * use 128KiB chunks (2MiB for thread-per-connection). */
   if (chunk_size < left)
   {
     send_size = chunk_size;
-    push_data = false; /* No need to push data, there is more to send, */
+    push_data = false; /* No need to push data, there is more to send. */
   }
   else
   {