gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r8461 - in libmicrohttpd: . src/daemon


From: gnunet
Subject: [GNUnet-SVN] r8461 - in libmicrohttpd: . src/daemon
Date: Fri, 15 May 2009 11:53:25 -0600

Author: grothoff
Date: 2009-05-15 11:53:25 -0600 (Fri, 15 May 2009)
New Revision: 8461

Modified:
   libmicrohttpd/ChangeLog
   libmicrohttpd/src/daemon/connection.c
Log:
grow buffer earlier

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2009-05-15 03:22:33 UTC (rev 8460)
+++ libmicrohttpd/ChangeLog     2009-05-15 17:53:25 UTC (rev 8461)
@@ -1,3 +1,7 @@
+Fri May 15 11:00:20 MDT 2009
+        Grow reserved read buffer more aggressively so that we are not
+        needlessly stuck reading only a handfull of bytes in each iteration. 
-CG
+
 Thu May 14 21:20:30 MDT 2009
         Fixed issue where the "NOTIFY_COMPLETED" handler could be called
         twice (if a socket error or timeout occured for a pipelined

Modified: libmicrohttpd/src/daemon/connection.c
===================================================================
--- libmicrohttpd/src/daemon/connection.c       2009-05-15 03:22:33 UTC (rev 
8460)
+++ libmicrohttpd/src/daemon/connection.c       2009-05-15 17:53:25 UTC (rev 
8461)
@@ -1543,6 +1543,11 @@
   connection->last_activity = time (NULL);
   if (connection->state == MHD_CONNECTION_CLOSED)
     return MHD_NO;
+  /* make sure "read" has a reasonable number of bytes
+     in buffer to use per system call (if possible) */
+  if (connection->read_buffer_offset + MHD_BUF_INC_SIZE >
+      connection->read_buffer_size)
+    try_grow_read_buffer (connection);
   if (MHD_NO == do_read (connection))
     return MHD_YES;
   while (1)





reply via email to

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