libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit a84334b18d15984b881f8eace7149c5ee9581837
parent 21bf15d021e2215c337141ec18c121b983687d46
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 22 Jun 2011 08:28:49 +0000

docu

Diffstat:
MChangeLog | 5+++++
Mdoc/microhttpd.texi | 7++++++-
Msrc/include/microhttpd.h | 9+++++----
3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jun 22 10:25:13 CEST 2011 + Eliminate unnecessary (and badly synchronized) calls to + MHD_get_timeout in MHD_USE_THREAD_PER_CONNECTION mode. + Document that this is not acceptable. -CG + Tue Jun 21 13:54:59 CEST 2011 Fixing tiny memory leak in SSL code from 'gnutls_priority_init'. Fixing data race between code doing connection shutdown and diff --git a/doc/microhttpd.texi b/doc/microhttpd.texi @@ -1165,7 +1165,12 @@ the right options for this call. Obtain timeout value for select for this daemon (only needed if connection timeout is used). The returned value is how long @cfunction{select} should at most block, not the timeout value set for -connections. +connections. This function must not be called if the +@code{MHD_USE_THREAD_PER_CONNECTION} mode is in use (since then it +is not meaningful to ask for a timeout, after all, there is +concurrenct activity). The function must also not be called by +user-code if @code{MHD_USE_INTERNAL_SELECT} is in use. In the latter +case, the behavior is undefined. @table @var @cindex timeout diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -1083,10 +1083,11 @@ MHD_get_fdset (struct MHD_Daemon *daemon, fd_set * write_fd_set, fd_set * except_fd_set, int *max_fd); /** - * Obtain timeout value for select for this daemon - * (only needed if connection timeout is used). The - * returned value is how long select should at most - * block, not the timeout value set for connections. + * Obtain timeout value for select for this daemon (only needed if + * connection timeout is used). The returned value is how long select + * should at most block, not the timeout value set for connections. + * This function MUST NOT be called if MHD is running with + * "MHD_USE_THREAD_PER_CONNECTION". * * @param daemon daemon to query for timeout * @param timeout set to the timeout (in milliseconds)