[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 03/03: MHD_start_daemon(): check for invali
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 03/03: MHD_start_daemon(): check for invalid combination of MHD_USE_NO_LISTEN_SOCKET and MHD_OPTION_LISTEN_SOCKET |
Date: |
Sat, 25 Mar 2017 19:01:28 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 8d9065a0774f4e07afdc21fd83d74e221a104c3d
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Sat Mar 25 20:58:24 2017 +0300
MHD_start_daemon(): check for invalid combination of
MHD_USE_NO_LISTEN_SOCKET and
MHD_OPTION_LISTEN_SOCKET
---
ChangeLog | 4 ++++
src/microhttpd/daemon.c | 14 ++++++++++++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c8fcffb9..08dd8499 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Mar 25 20:59:18 MSK 2017
+ Check for invalid combinations of flags and options in
+ MHD_start_daemon(). -EG
+
Tue Mar 21 13:51:04 CET 2017
Use "-lrt" to link libmicrohttpd if we are using
clock_gettime() as needed by glibc < 2.17. -CG
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 296c0ee8..69180865 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -5005,8 +5005,18 @@ parse_options_va (struct MHD_Daemon *daemon,
break;
#endif
case MHD_OPTION_LISTEN_SOCKET:
- daemon->listen_fd = va_arg (ap,
- MHD_socket);
+ if (0 != (daemon->options & MHD_USE_NO_LISTEN_SOCKET))
+ {
+#ifdef HAVE_MESSAGES
+ MHD_DLOG (daemon,
+ _("MHD_OPTION_LISTEN_SOCKET specified for daemon "
+ "with MHD_USE_NO_LISTEN_SOCKET flag set.\n"));
+#endif
+ return MHD_NO;
+ }
+ else
+ daemon->listen_fd = va_arg (ap,
+ MHD_socket);
break;
case MHD_OPTION_EXTERNAL_LOGGER:
#ifdef HAVE_MESSAGES
--
To stop receiving notification emails like this one, please contact
address@hidden