[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 03/04: test_upgrade: fixed test with 'auto'
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 03/04: test_upgrade: fixed test with 'auto' flags |
Date: |
Thu, 16 Mar 2017 15:05:22 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 3f9f4d8b53a403c82949847d59d7e544ae8f4ea6
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Thu Mar 16 15:09:42 2017 +0300
test_upgrade: fixed test with 'auto' flags
---
src/microhttpd/test_upgrade.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index 01e963f1..06dac795 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -955,8 +955,10 @@ run_mhd_loop (struct MHD_Daemon *daemon,
else if (0 != (flags & MHD_USE_EPOLL))
run_mhd_epoll_loop (daemon);
#endif
- else
+ else if (0 == (flags & (MHD_USE_POLL | MHD_USE_EPOLL)))
run_mhd_select_loop (daemon);
+ else
+ abort ();
}
static bool test_tls;
@@ -974,6 +976,7 @@ test_upgrade (int flags,
struct MHD_Daemon *d = NULL;
wr_socket sock;
struct sockaddr_in sa;
+ const union MHD_DaemonInfo *real_flags;
#if defined(HTTPS_SUPPORT) && defined(HAVE_FORK) && defined(HAVE_WAITPID)
pid_t pid = -1;
#endif /* HTTPS_SUPPORT && HAVE_FORK && HAVE_WAITPID */
@@ -1006,6 +1009,9 @@ test_upgrade (int flags,
#endif /* HTTPS_SUPPORT */
if (NULL == d)
return 2;
+ real_flags = MHD_get_daemon_info(d, MHD_DAEMON_INFO_FLAGS);
+ if (NULL == real_flags)
+ abort ();
if (!test_tls || TLS_LIB_GNUTLS == use_tls_tool)
{
sock = test_tls ? wr_create_tls_sckt () : wr_create_plain_sckt ();
@@ -1042,7 +1048,7 @@ test_upgrade (int flags,
&sock))
abort ();
if (0 == (flags & MHD_USE_INTERNAL_POLLING_THREAD) )
- run_mhd_loop (d, flags);
+ run_mhd_loop (d, real_flags->flags);
pthread_join (pt_client,
NULL);
pthread_join (pt,
--
To stop receiving notification emails like this one, please contact
address@hidden