gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] GNU libmicrohttpd branch master updated. 83


From: gitolite
Subject: [GNUnet-SVN] [libmicrohttpd] GNU libmicrohttpd branch master updated. 832ebd16a857fa1a4f4e2a657e376766963e7f62
Date: Thu, 10 Nov 2016 17:30:14 +0100 (CET)

The branch, master has been updated
       via  832ebd16a857fa1a4f4e2a657e376766963e7f62 (commit)
       via  e067df9397516bd671dcfd079ec561371399468d (commit)
      from  51c1f5e65bff0eee79d87874ee5b8f1514c38032 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 832ebd16a857fa1a4f4e2a657e376766963e7f62
Author: Evgeny Grin (Karlson2k) <address@hidden>
Date:   Thu Nov 10 19:27:34 2016 +0300

    Updated ChangeLog and bumped version patchlevel.

commit e067df9397516bd671dcfd079ec561371399468d
Author: Evgeny Grin (Karlson2k) <address@hidden>
Date:   Thu Nov 10 17:39:56 2016 +0300

    One more flag renamed: MHD_USE_EPOLL_TURBO -> MHD_USE_TURBO.
    Hopefully last one for now.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                      | 40 ++++++++++++++++++++++++++++++++++++++++
 doc/libmicrohttpd.texi         |  7 ++-----
 src/examples/benchmark.c       |  2 +-
 src/examples/benchmark_https.c |  2 +-
 src/include/microhttpd.h       | 15 ++++++++++++---
 src/microhttpd/connection.c    |  2 +-
 src/microhttpd/daemon.c        |  4 ++--
 7 files changed, 59 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cac4cb0..bf40e5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+Thu Nov 10 17:49:56 MSK 2016
+       Ported "upgrade" tests to W32 and other platforms, used
+       "gnutls-cli" instead of "openssl" in tests, minor bugs
+       fixed, added verbose reporting if requested.
+       "Upgrade" processing - changed internal handling logic, improved
+       and refactored, bugs fixed, fixed sigpipe on Darwin, added
+       printing error to log, fixed compilation without HTTPS.
+       Added 'configure' parameter "--disable-httpupgrade" for building
+       minimal-sized MHD versions.
+       Added feature check "MHD_FEATURE_UPGRADE".
+       Responses destroyed (freed) earlier if possible.
+       Added many remarks in code comments about thread safety.
+       Some data races and other multithread-related issues are fixed,
+       including usage of closed sockets (may resulted in accidental closing
+       of wrong socket).
+       SO_NOSIGPIPE is used on all platform which support it, not only
+       on Darwin.
+       Added support for suspending connections in thread-per-connection
+       mode (itself almost useless, mostly to unify modes support).
+       Fixed Inter-Thread Communication channel usage in epoll modes.
+       Reworked daemon cleanups and handling MHD_stop_daemon(): resources
+       are freed only by specific threads, data races and other fixes.
+       Started usage of C99 standard 'bool' where supported with
+       fallback to 'int'.
+       Renamed many MHD flags. Now they are self-explainable and more
+       obvious, like MHD_USE_INTERNAL_POLLING_THREAD instead of
+       MHD_USE_SELECT_INTERNALLY. Old flag names are supported for
+       backward compatibility.
+       Improved processing of "fast" connections: now full sequence
+       "read request - send reply headers - send reply body" is processed
+       after single select()/poll(). If connection is slow, request is huge
+       or response in not immediately ready - connection will be processed
+       in "traditional" way.
+       Added usage of "calloc()" where supported.
+       Minor documentation fixes.
+       Minor improvements and fixes. -EG
+       "Upgrade" test fixes.
+       Documentation updated.
+       Added HTTP "Upgrade" example. -CG
+
 Mon Oct 17 19:08:18 CEST 2016
        Fixed misc. issues relating to upgrade.
        Releasing experimental 0.9.52. -CG
diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi
index 0078480..fae5454 100644
--- a/doc/libmicrohttpd.texi
+++ b/doc/libmicrohttpd.texi
@@ -523,12 +523,9 @@ call has fundamentally lower complexity (O(1) for 
@code{epoll()}
 vs. O(n) for @code{select()}/@code{poll()} where n is the number of
 open connections).
 
address@hidden MHD_USE_EPOLL_TURBO
address@hidden MHD_USE_TURBO
 @cindex performance
-Enable optimizations to aggressively improve performance.  Note that
-the option is a slight misnomer, as these days it also enables optimziations
-that are unrelated to @code{MHD_USE_EPOLL}.  Hence it is OK to
-use this option with other event loops.
+Enable optimizations to aggressively improve performance.
 
 Currently, the optimizations this option enables are based on
 opportunistic reads and writes.  Bascially, MHD will simply try to
diff --git a/src/examples/benchmark.c b/src/examples/benchmark.c
index bd17b37..f9b8b5f 100644
--- a/src/examples/benchmark.c
+++ b/src/examples/benchmark.c
@@ -136,7 +136,7 @@ main (int argc, char *const *argv)
 #endif
   d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | 
MHD_USE_SUPPRESS_DATE_NO_CLOCK
 #ifdef EPOLL_SUPPORT
-                       | MHD_USE_EPOLL | MHD_USE_EPOLL_TURBO
+                       | MHD_USE_EPOLL | MHD_USE_TURBO
 #endif
                        ,
                         atoi (argv[1]),
diff --git a/src/examples/benchmark_https.c b/src/examples/benchmark_https.c
index 009944d..b7327af 100644
--- a/src/examples/benchmark_https.c
+++ b/src/examples/benchmark_https.c
@@ -182,7 +182,7 @@ main (int argc, char *const *argv)
                                              MHD_RESPMEM_PERSISTENT);
   d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS
 #ifdef EPOLL_SUPPORT
-                       | MHD_USE_EPOLL | MHD_USE_EPOLL_TURBO
+                       | MHD_USE_EPOLL | MHD_USE_TURBO
 #endif
                        ,
                         atoi (argv[1]),
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 0f3e487..f0c8f00 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -126,7 +126,7 @@ typedef intptr_t ssize_t;
  * Current version of the library.
  * 0x01093001 = 1.9.30-1.
  */
-#define MHD_VERSION 0x00095206
+#define MHD_VERSION 0x00095207
 
 /**
  * MHD-internal return code for "YES".
@@ -720,11 +720,20 @@ enum MHD_FLAG
   MHD_USE_DUAL_STACK = MHD_USE_IPv6 | 2048,
 
   /**
-   * Enable `epoll()` turbo.  Disables certain calls to `shutdown()`
-   * and enables aggressive non-blocking optimisitc reads.
+   * Enable `turbo`.  Disables certain calls to `shutdown()`,
+   * enables aggressive non-blocking optimistic reads and
+   * other potentially unsafe optimizations.
    * Most effects only happen with #MHD_USE_EPOLL.
    */
+  MHD_USE_TURBO = 4096,
+
+  /** @deprecated */
   MHD_USE_EPOLL_TURBO = 4096,
+#if 0 /* Will be marked for real deprecation later. */
+#define MHD_USE_EPOLL_TURBO \
+  _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_TURBO is deprecated, use 
MHD_USE_TURBO") \
+  MHD_USE_TURBO
+#endif /* 0 */
 
   /**
    * Enable suspend/resume functions, which also implies setting up
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 6483f36..ac1a01e 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -506,7 +506,7 @@ MHD_connection_mark_closed_ (struct MHD_Connection 
*connection)
 
   connection->state = MHD_CONNECTION_CLOSED;
   connection->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP;
-  if (0 == (daemon->options & MHD_USE_EPOLL_TURBO))
+  if (0 == (daemon->options & MHD_USE_TURBO))
     {
 #ifdef HTTPS_SUPPORT
       /* For TLS connection use shutdown of TLS layer
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index fda8283..da7a260 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2252,7 +2252,7 @@ internal_add_connection (struct MHD_Daemon *daemon,
 #ifdef EPOLL_SUPPORT
   if (0 != (daemon->options & MHD_USE_EPOLL))
     {
-      if (0 == (daemon->options & MHD_USE_EPOLL_TURBO))
+      if (0 == (daemon->options & MHD_USE_TURBO))
        {
          struct epoll_event event;
 
@@ -2602,7 +2602,7 @@ MHD_add_connection (struct MHD_Daemon *daemon,
   else
     sk_nonbl = !0;
 
-  if ( (0 != (daemon->options & MHD_USE_EPOLL_TURBO)) &&
+  if ( (0 != (daemon->options & MHD_USE_TURBO)) &&
        (! MHD_socket_noninheritable_ (client_socket)) )
     {
 #ifdef HAVE_MESSAGES


hooks/post-receive
-- 
GNU libmicrohttpd



reply via email to

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