gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated (b39aacb2 -> 9d9a9e4b)


From: gnunet
Subject: [libmicrohttpd] branch master updated (b39aacb2 -> 9d9a9e4b)
Date: Mon, 26 Oct 2020 20:21:52 +0100

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

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from b39aacb2 typo
     new 04bb4821 new_connection_process_(): additional assert
     new d46bdbc3 daemon.c: clearer error report for sockets not fit FD_SETSIZE
     new 9d9a9e4b test_add_conn: minor fixes and improvements

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/microhttpd/daemon.c      | 16 ++++++++++++----
 src/testcurl/test_add_conn.c | 12 +++++-------
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 03649adf..fc6303e2 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2656,6 +2656,12 @@ new_connection_process_ (struct MHD_Daemon *daemon,
   int eno = 0;
 
   mhd_assert (connection->daemon == daemon);
+
+  /* Function manipulate connection and timeout DL-lists,
+   * must be called only within daemon thread. */
+  mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \
+               MHD_thread_ID_match_current_ (daemon->pid) );
+
   /* Allocate memory pool in the processing thread so
    * intensively used memory area is allocated in "good"
    * (for the thread) memory region. It is important with
@@ -2862,7 +2868,8 @@ internal_add_connection (struct MHD_Daemon *daemon,
   {
 #ifdef HAVE_MESSAGES
     MHD_DLOG (daemon,
-              _ ("Socket descriptor larger than FD_SETSIZE: %d > %d\n"),
+              _ ("New connection socket descriptor (%d) is not less " \
+                 "than FD_SETSIZE (%d).\n"),
               (int) client_socket,
               (int) FD_SETSIZE);
 #endif
@@ -6638,9 +6645,10 @@ MHD_start_daemon_va (unsigned int flags,
   {
 #ifdef HAVE_MESSAGES
     MHD_DLOG (daemon,
-              _ ("Socket descriptor larger than FD_SETSIZE: %d > %d\n"),
-              listen_fd,
-              FD_SETSIZE);
+              _ ("Listen socket descriptor (%d) is not " \
+                  "less than FD_SETSIZE (%d).\n"),
+              (int) listen_fd,
+              (int) FD_SETSIZE);
 #endif
     MHD_socket_close_chk_ (listen_fd);
     goto free_and_fail;
diff --git a/src/testcurl/test_add_conn.c b/src/testcurl/test_add_conn.c
index 68b568b7..db6e85fd 100644
--- a/src/testcurl/test_add_conn.c
+++ b/src/testcurl/test_add_conn.c
@@ -208,7 +208,8 @@ _externalErrorExit_func (const char *errDesc, const char 
*funcName, int lineNum)
   if (0 < lineNum)
     fprintf (stderr, " at line %d", lineNum);
 
-  fprintf (stderr, ".\nLast errno value: %d\n", (int) errno);
+  fprintf (stderr, ".\nLast errno value: %d (%s)\n", (int) errno,
+           strerror (errno));
 #ifdef MHD_WINSOCK_SOCKETS
   fprintf (stderr, "WSAGetLastError() value: %d\n", (int) WSAGetLastError ());
 #endif /* MHD_WINSOCK_SOCKETS */
@@ -700,7 +701,8 @@ startTestMhdDaemon (enum testMhdThreadsType thrType,
                           | MHD_USE_ERROR_LOG,
                           *pport, NULL, NULL,
                           &ahc_echo, "GET",
-                          MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
+                          MHD_OPTION_THREAD_POOL_SIZE, (unsigned
+                                                        int) MHD_CPU_COUNT,
                           MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL,
                           MHD_OPTION_END);
 
@@ -1058,17 +1060,13 @@ main (int argc, char *const *argv)
    * Mostly useful when configured with '--enable-asserts. */
   slow_reply = cleanup_test;
   ignore_response_errors = cleanup_test;
-  if (cleanup_test)
-    response_timeout_val /= 5;
-  if (0 == response_timeout_val)
-    response_timeout_val = 1;
 #ifndef HAVE_PTHREAD_H
   if (cleanup_test)
     return 77; /* Cannot run without threads */
 #endif /* HAVE_PTHREAD_H */
   verbose = ! has_param (argc, argv, "-q") || has_param (argc, argv, 
"--quiet");
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
-    return 2;
+    return 99;
   /* Could be set to non-zero value to enforce using specific port
    * in the test */
   global_port = 0;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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