gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] 07/07: MHD_start_daemon(): obey MHD_USE_ITC


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 07/07: MHD_start_daemon(): obey MHD_USE_ITC in thread pool mode
Date: Sun, 26 Mar 2017 12:52:45 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 6f6a4e220b2a02b86364cfe093570ad4ddd06860
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Sun Mar 26 13:32:12 2017 +0300

    MHD_start_daemon(): obey MHD_USE_ITC in thread pool mode
---
 ChangeLog               |  5 +++++
 src/microhttpd/daemon.c | 21 ++++++++++-----------
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4f627234..147a1741 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Mar 26 13:49:01 MSK 2017
+       Internal refactoring for simplification and unification.
+       Minor optimizations and minor fixes.
+       MHD_USE_ITC used again in thread pool mode. -EG
+
 Sat Mar 25 20:58:24 CET 2017
        Remove dead MHD_strx_to_sizet-functions and associated
        test cases from code. -CG
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 41b15584..bda9292f 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -5955,8 +5955,7 @@ MHD_start_daemon_va (unsigned int flags,
           d->worker_pool_size = 0;
           d->worker_pool = NULL;
 
-          /* Always use individual control ITCs */
-          if (1)
+          if (0 != (*pflags & MHD_USE_ITC))
             {
               if (! MHD_itc_init_ (d->itc))
                 {
@@ -5967,17 +5966,17 @@ MHD_start_daemon_va (unsigned int flags,
 #endif
                   goto thread_failed;
                 }
-            }
-          if ( (0 == (*pflags & (MHD_USE_POLL | MHD_USE_EPOLL))) &&
-               (! MHD_SCKT_FD_FITS_FDSET_(MHD_itc_r_fd_ (d->itc),
-                                          NULL)) )
-            {
+              if ( (0 == (*pflags & (MHD_USE_POLL | MHD_USE_EPOLL))) &&
+                   (! MHD_SCKT_FD_FITS_FDSET_(MHD_itc_r_fd_ (d->itc),
+                                              NULL)) )
+                {
 #ifdef HAVE_MESSAGES
-              MHD_DLOG (daemon,
-                        _("File descriptor for worker inter-thread 
communication channel exceeds maximum value\n"));
+                  MHD_DLOG (daemon,
+                            _("File descriptor for worker inter-thread 
communication channel exceeds maximum value\n"));
 #endif
-              MHD_itc_destroy_chk_ (d->itc);
-              goto thread_failed;
+                  MHD_itc_destroy_chk_ (d->itc);
+                  goto thread_failed;
+                }
             }
 
           /* Divide available connections evenly amongst the threads.

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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