diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-08-28 09:41:30 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-08-28 09:41:30 +0000 |
commit | a5f4e104ccedd8ef63ac2a34696db0c3e0a20136 (patch) | |
tree | 3a685e1bec4d6cf08d30d7c0e27fe3d332a802f9 | |
parent | 991598830f7944e689604c3b85d7675fe6150ca6 (diff) | |
download | libmicrohttpd-a5f4e104ccedd8ef63ac2a34696db0c3e0a20136.tar.gz libmicrohttpd-a5f4e104ccedd8ef63ac2a34696db0c3e0a20136.zip |
-do not run epoll tests if epoll was disabled, even on linux
-rw-r--r-- | src/microhttpd/daemon.c | 2 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get_parallel.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get_select.c | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 563c5bb4..a5e0f076 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -1568,6 +1568,8 @@ MHD_cleanup_connections (struct MHD_Daemon *daemon) | |||
1568 | (struct sockaddr *) pos->addr, | 1568 | (struct sockaddr *) pos->addr, |
1569 | pos->addr_len); | 1569 | pos->addr_len); |
1570 | #if EPOLL_SUPPORT | 1570 | #if EPOLL_SUPPORT |
1571 | if (0 != (pos->epoll_state & MHD_EPOLL_STATE_IN_EREADY_EDLL)) | ||
1572 | MHD_PANIC ("Internal error"); | ||
1571 | if ( (0 != (daemon->options & MHD_USE_EPOLL_LINUX_ONLY)) && | 1573 | if ( (0 != (daemon->options & MHD_USE_EPOLL_LINUX_ONLY)) && |
1572 | (-1 != daemon->epoll_fd) && | 1574 | (-1 != daemon->epoll_fd) && |
1573 | (0 != (pos->epoll_state & MHD_EPOLL_STATE_IN_EPOLL_SET)) ) | 1575 | (0 != (pos->epoll_state & MHD_EPOLL_STATE_IN_EPOLL_SET)) ) |
diff --git a/src/testcurl/https/test_https_get_parallel.c b/src/testcurl/https/test_https_get_parallel.c index 32f34ec0..33cf5e42 100644 --- a/src/testcurl/https/test_https_get_parallel.c +++ b/src/testcurl/https/test_https_get_parallel.c | |||
@@ -141,7 +141,7 @@ main (int argc, char *const *argv) | |||
141 | 141 | ||
142 | if (curl_uses_nss_ssl() == 0) | 142 | if (curl_uses_nss_ssl() == 0) |
143 | aes256_sha = "rsa_aes_256_sha"; | 143 | aes256_sha = "rsa_aes_256_sha"; |
144 | #if LINUX | 144 | #if EPOLL_SUPPORT |
145 | errorCount += | 145 | errorCount += |
146 | test_wrap ("single threaded daemon, single client, epoll", &test_single_client, | 146 | test_wrap ("single threaded daemon, single client, epoll", &test_single_client, |
147 | NULL, | 147 | NULL, |
@@ -157,7 +157,7 @@ main (int argc, char *const *argv) | |||
157 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 157 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, |
158 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 158 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
159 | srv_self_signed_cert_pem, MHD_OPTION_END); | 159 | srv_self_signed_cert_pem, MHD_OPTION_END); |
160 | #if LINUX | 160 | #if EPOLL_SUPPORT |
161 | errorCount += | 161 | errorCount += |
162 | test_wrap ("single threaded daemon, parallel clients, epoll", | 162 | test_wrap ("single threaded daemon, parallel clients, epoll", |
163 | &test_parallel_clients, NULL, | 163 | &test_parallel_clients, NULL, |
diff --git a/src/testcurl/https/test_https_get_select.c b/src/testcurl/https/test_https_get_select.c index 0dd4e11d..70a16425 100644 --- a/src/testcurl/https/test_https_get_select.c +++ b/src/testcurl/https/test_https_get_select.c | |||
@@ -221,7 +221,7 @@ main (int argc, char *const *argv) | |||
221 | fprintf (stderr, "Error: %s\n", strerror (errno)); | 221 | fprintf (stderr, "Error: %s\n", strerror (errno)); |
222 | return -1; | 222 | return -1; |
223 | } | 223 | } |
224 | #if LINUX | 224 | #if EPOLL_SUPPORT |
225 | if (0 != (errorCount = testExternalGet (MHD_USE_EPOLL_LINUX_ONLY))) | 225 | if (0 != (errorCount = testExternalGet (MHD_USE_EPOLL_LINUX_ONLY))) |
226 | fprintf (stderr, "Fail: %d\n", errorCount); | 226 | fprintf (stderr, "Fail: %d\n", errorCount); |
227 | #endif | 227 | #endif |