libmicrohttpd

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

commit 484e65d76e26874485e906f5221156442bb52467
parent 4a08a776b3863d0d6de9c7fcb4efdae52a61d628
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 24 Aug 2008 18:02:27 +0000

cleanup

Diffstat:
Msrc/daemon/Makefile.am | 2+-
Msrc/daemon/connection.h | 7++++---
Msrc/daemon/connection_https.c | 11+++--------
Asrc/daemon/connection_https.h | 35+++++++++++++++++++++++++++++++++++
Msrc/daemon/daemon.c | 1+
5 files changed, 44 insertions(+), 12 deletions(-)

diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am @@ -37,7 +37,7 @@ libmicrohttpd_la_LDFLAGS = \ if ENABLE_HTTPS SUBDIRS += https . -libmicrohttpd_la_SOURCES += connection_https.c +libmicrohttpd_la_SOURCES += connection_https.c connection_https.h libmicrohttpd_la_LIBADD = \ https/lgl/liblgl.la \ https/x509/libx509.la \ diff --git a/src/daemon/connection.h b/src/daemon/connection.h @@ -42,8 +42,9 @@ MHD_connection_get_fdset (struct MHD_Connection *connection, void MHD_set_http_calbacks (struct MHD_Connection *connection); -#if HTTPS_SUPPORT -void MHD_set_https_calbacks (struct MHD_Connection *connection); -#endif +int MHD_connection_handle_read (struct MHD_Connection *connection); +int MHD_connection_handle_write (struct MHD_Connection *connection); +int MHD_connection_handle_idle (struct MHD_Connection *connection); + #endif diff --git a/src/daemon/connection_https.c b/src/daemon/connection_https.c @@ -39,11 +39,6 @@ /* TODO #include rm "gnutls_errors.h" */ #include "gnutls_errors.h" -/* forward declarations used when setting secure connection callbacks */ -int MHD_connection_handle_read (struct MHD_Connection *connection); -int MHD_connection_handle_write (struct MHD_Connection *connection); -int MHD_connection_handle_idle (struct MHD_Connection *connection); - /** * Obtain information about the given connection. * @@ -175,7 +170,7 @@ MHDS_con_write (struct MHD_Connection *connection) * @return MHD_YES if we should continue to process the * connection (not dead yet), MHD_NO if it died */ -int +static int MHD_tls_connection_handle_idle (struct MHD_Connection *connection) { unsigned int timeout; @@ -231,7 +226,7 @@ MHD_tls_connection_handle_idle (struct MHD_Connection *connection) * @return MHD_YES if we should continue to process the * connection (not dead yet), MHD_NO if it died */ -int +static int MHD_tls_connection_handle_read (struct MHD_Connection *connection) { int ret; @@ -374,7 +369,7 @@ MHD_tls_connection_handle_read (struct MHD_Connection *connection) * @return MHD_connection_handle_write() if we should continue to * process the connection (not dead yet), MHD_NO if it died */ -int +static int MHD_tls_connection_handle_write (struct MHD_Connection *connection) { connection->last_activity = time (NULL); diff --git a/src/daemon/connection_https.h b/src/daemon/connection_https.h @@ -0,0 +1,35 @@ +/* + This file is part of libmicrohttpd + (C) 2008 Daniel Pittman and Christian Grothoff + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/** + * @file connection_https.h + * @brief Methods for managing connections + * @author Christian Grothoff + */ + +#ifndef CONNECTION_HTTPS_H +#define CONNECTION_HTTPS_H + +#include "internal.h" + +#if HTTPS_SUPPORT +void MHD_set_https_calbacks (struct MHD_Connection *connection); +#endif + +#endif diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c @@ -30,6 +30,7 @@ #include "memorypool.h" #if HTTPS_SUPPORT +#include "connection_https.h" #include "gnutls_int.h" #include "gnutls_global.h" #include "auth_anon.h"