commit d550af2a104d21e7eb06f418a6fbb8a509266a37
parent 665502d76a87f4c1611cb05a387fd6f1941345a0
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 11 Sep 2008 03:50:35 +0000
update
Diffstat:
4 files changed, 41 insertions(+), 29 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Sep 10 21:36:06 MDT 2008
+ Fixed data race on closing sockets during
+ shutdown (in one-thread-per-connection mode). -CG
+
Thu Sep 4 23:37:18 MDT 2008
Fixed some boundary issues with processing
chunked requests; removed memmove from a
diff --git a/README b/README
@@ -24,8 +24,9 @@ reporting (and use MHD_USE_DEBUG). Error reporting is not enabled by
default to reduce the size of the library (error messages take
space!). If you are concerned about space, you should set "CFLAGS" to
"-Os -fomit-frame-pointer" to have gcc generate tight code. The
-resulting binary should be about 25k depending on the platform (I
-got 25884 bytes using "-march=pentium4").
+resulting binary should be about 30k (without SSL support) depending
+on the platform.
+
Portability
===========
@@ -64,16 +65,14 @@ Development Status
This is a beta release. Below we list things that should be
implemented (in order of importance) before we can claim to be
-reasonably complete. #XXXX refers to the respective Mantis bug report
-(or feature request).
-
+reasonably complete.
Missing features:
=================
-- SSL support:
- * documentation
- * more testing
+- SSL code is still too large (plenty of dead or
+ unnecessary code imported from gnuTLS)
+- Make sure SSL works on non-GNU/Linux platforms
Untested features:
@@ -87,12 +86,18 @@ Untested features:
suppressing 100 CONTINUE
- extend testcase for chunked encoding to validate
handling of footers
+- more testing for SSL support
Missing documentation:
======================
-- manual (SSL/TLS support)
+
+- manual:
+ * document configuration options
+ * document SSL/TLS support
+ * document details on porting MHD (plibc, z/OS)
- tutorial:
* clean up English
* make sure everything is accurate
* change example code to follow GNU coding conventions
+ * provide examples for using SSL
diff --git a/configure.ac b/configure.ac
@@ -21,8 +21,8 @@
#
#
AC_PREREQ(2.57)
-AC_INIT([libmicrohttpd], [0.3.1],[libmicrohttpd@gnunet.org])
-AM_INIT_AUTOMAKE([libmicrohttpd], [0.3.1])
+AC_INIT([libmicrohttpd], [0.4.0pre0],[libmicrohttpd@gnunet.org])
+AM_INIT_AUTOMAKE([libmicrohttpd], [0.4.0pre0])
AM_CONFIG_HEADER([MHD_config.h])
AH_TOP([#define _GNU_SOURCE 1])
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
@@ -597,32 +597,35 @@ MHD_cleanup_connections (struct MHD_Daemon *daemon)
prev = NULL;
while (pos != NULL)
{
- if (pos->socket_fd == -1)
- {
+ if ( (pos->socket_fd == -1) ||
+ ( ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
+ (daemon->shutdown) &&
+ (pos->socket_fd != -1) ) ) )
+ {
if (prev == NULL)
daemon->connections = pos->next;
else
- prev->next = pos->next;
- if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
- {
- pthread_kill (pos->pid, SIGALRM);
- pthread_join (pos->pid, &unused);
- }
- MHD_destroy_response (pos->response);
- MHD_pool_destroy (pos->pool);
+ prev->next = pos->next;
+ if (0 != (pos->daemon->options & MHD_USE_THREAD_PER_CONNECTION))
+ {
+ pthread_kill (pos->pid, SIGALRM);
+ pthread_join (pos->pid, &unused);
+ }
+ MHD_destroy_response (pos->response);
+ MHD_pool_destroy (pos->pool);
#if HTTPS_SUPPORT
- if (pos->tls_session != NULL)
- MHD_gnutls_deinit (pos->tls_session);
+ if (pos->tls_session != NULL)
+ MHD_gnutls_deinit (pos->tls_session);
#endif
- free (pos->addr);
- free (pos);
- daemon->max_connections++;
- if (prev == NULL)
+ free (pos->addr);
+ free (pos);
+ daemon->max_connections++;
+ if (prev == NULL)
pos = daemon->connections;
else
pos = prev->next;
- continue;
- }
+ continue;
+ }
prev = pos;
pos = pos->next;
}